Lending of local processing capability between connected terminals

ABSTRACT

A device and method for lending a local processing capability between connected terminals, the method including displaying, by a first electronic device, a first screen, where the first screen is a camera screen of the first electronic device, detecting a first operation of a user on the first screen, obtaining a first image file through photographing in response to the first operation, wherein the image file is a picture or a video, automatically sending the first image file to a second electronic device, automatically receiving processing data sent by the second electronic device, where the processing data is obtained by the second electronic device by processing the first image file, and where the processing data is associated with a second image file, detecting a second operation of the user on the first screen, and displaying the second image file in response to the second operation.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a national stage of International Application No.PCT/CN2018/086225, filed on May 9, 2018, which is incorporated herein byreference in its entirety.

TECHNICAL FIELD

This application relates to the field of terminal technologies, and inparticular, to an image processing method and an electronic device.

BACKGROUND

With development of mobile communication and terminal devices, a userposes an increasingly high requirement on processing a large quantity ofdaily tasks by using a terminal device. For example, these tasks mayinclude images, image recognition, image classification, texttranslation, video optimization, and speech recognition. However, mostterminal devices used in the market have weak local processingcapabilities, and can only process a limited quantity of simple tasks.Consequently, a user requirement cannot be met, and user experience isrelatively poor.

SUMMARY OF THE INVENTION

Embodiments of this application provide an image processing method andan electronic device, so that a user using a low-end device can enjoy aprocessing capability of a high-end device. This improves userexperience for the low-end device.

To achieve the foregoing objective, the following technical solutionsare used in the embodiments of this application.

According to a first aspect, an embodiment of this application providesan image processing method. The method may be applied to a firstelectronic device, and includes: displaying, by the first electronicdevice, a first screen, where the first screen is a camera screen of thefirst electronic device; detecting, by the first electronic device, afirst operation of a user on the first screen; obtaining, by the firstelectronic device, a first image file through photographing in responseto the first operation, where the image file includes a picture or avideo; detecting, by the first electronic device, a second operation ofthe user on the first screen; and displaying, by the first electronicdevice, a second image file in response to the second operation, wherethe second image file is associated with a result obtained after asecond electronic device processes the first image file.

According to this solution, the first electronic device having arelatively weak local processing capability may process the first imagefile by borrowing a capability of the second electronic device, so thatthe first electronic device locally displays a processing result. Thiscan improve user experience for the first electronic device having arelatively weak local processing capability.

In a possible implementation, after the obtaining, by the firstelectronic device, a first image file through photographing, the methodfurther includes: automatically sending, by the first electronic device,the first image file to the second electronic device; and automaticallyreceiving processing data sent by the second electronic device, wherethe processing data is obtained by the second electronic device byprocessing the first image file, and the processing data is associatedwith the second image file.

In other words, after the first electronic device obtains the firstimage file through photographing, without a dedicated instructionoperation of the user, the first electronic device may automaticallysend the first image file and automatically receive the processing datafrom the second electronic device.

In another possible implementation, before the obtaining, by the firstelectronic device, a first image file through photographing, the methodfurther includes: receiving, by the first electronic device, aprocessing type that is set by the user; and sending the processing typeto the second electronic device.

In this solution, the user may preset the processing type, and send theprocessing type to the second electronic device by using the firstelectronic device. The second electronic device may learn of theprocessing type, and then process the first image file based on theprocessing type.

In another possible implementation, the processing data includes thesecond image file.

In another possible implementation, the processing data includes aresult obtained by performing facial recognition based on the firstimage file.

In another possible implementation, the processing data includes alabel, the label corresponds to one folder, and the second image file isin the folder.

In another possible implementation, the processing type includes one ormore of image beautification, image classification, image facialrecognition, image clustering, image facial expression recognition,image age analysis, image optical character recognition OCR, or imagesemantic segmentation.

In another possible implementation, before the obtaining, by the firstelectronic device, a first image file through photographing, the methodfurther includes: establishing, by the first electronic device, ashort-distance connection to the second electronic device.

In other words, a plurality of electronic devices connected to eachother in a short distance may lend respective processing capabilities.

In another possible implementation, there are a plurality of secondelectronic devices, and the processing data is data obtained bycombining a plurality of pieces of processing data of the plurality ofsecond electronic devices.

In this solution, when there are a plurality of electronic devices thatprocess the first image file, processing results obtained by differentelectronic devices may be combined into one complete processing result.

In another possible implementation, there are a plurality of processingtypes, and processing data obtained by each second electronic devicecorresponds to at least one of the plurality of processing types.

In this solution, when there are a plurality of electronic devices thatprocess the first image file, different electronic devices may cooperatewith each other to complete an entire processing process.

According to a second aspect, an embodiment of this application providesanother image processing method, including: obtaining, by a firstelectronic device, a first image file through photographing whendetecting a first operation of a user, where the image file includes apicture or a video; sending, by the first electronic device, aprocessing type and the first image file to a second electronic devicewhen detecting a fourth operation performed by the user for the firstimage file; automatically receiving, by the first electronic device,processing data sent by the second electronic device, where theprocessing data is associated with a second image file; and displaying,by the first electronic device, the second image file based on theprocessing data.

In this solution, the user may set the processing type after obtaining apicture through photographing, and send the processing type to thesecond electronic device by using the first electronic device, so thatthe second electronic device processes the first image file based on theprocessing type. Therefore, the first electronic device having arelatively weak local processing capability may process the first imagefile by borrowing a capability of the second electronic device, so thatthe first electronic device locally displays a processing result. Thiscan improve user experience for the first electronic device having arelatively weak local processing capability.

According to a third aspect, an embodiment of this application providesanother image processing method, including: establishing, by a firstelectronic device, a short-distance connection to a second electronicdevice; receiving, by the first electronic device, a processing typethat is set by a user; sending, by the first electronic device, theprocessing type to the second electronic device; displaying, by thefirst electronic device, a first screen, where the first screen is acamera screen of the first electronic device; detecting, by the firstelectronic device, a first operation of the user on the first screen;obtaining, by the first electronic device, a first image file throughphotographing in response to the first operation, where the image fileincludes a picture or a video; automatically sending, by the firstelectronic device, the first image file to the second electronic device;automatically receiving, by the first electronic device, processing datasent by the second electronic device, where the processing data isobtained by the second electronic device by processing the first imagefile, and the processing data includes a second image file; detecting,by the first electronic device, a second operation of the user on thefirst screen; and displaying, by the first electronic device, the secondimage file in response to the second operation.

According to a fourth aspect, an embodiment of this application providesan image processing method. The method is applied to a second electronicdevice, and includes: establishing, by the second electronic device, ashort-distance connection to a first electronic device; receiving, bythe second electronic device, a first image file sent by the firstelectronic device, where the image file includes a picture or a video;displaying, by the second electronic device, a prompt screen, where theprompt screen is used to prompt a user that the first electronic devicerequests image processing; and when detecting that the user accepts athird operation requested by the first electronic device, processing, bythe second electronic device, the first image file in response to thethird operation, to obtain processing data, and sending the processingdata to the first electronic device, where the processing data isassociated with a second image file.

In this solution, the second electronic device having a relativelystrong local processing capability may lend a capability for processingthe first image file to the first electronic device, so that the firstelectronic device can locally display a processing result of the secondelectronic device. This can improve user experience for the firstelectronic device having a relatively weak local processing capability.

In a possible implementation, before the receiving, by the secondelectronic device, a first image file sent by the first electronicdevice, the method further includes: obtaining, by the second electronicdevice, a processing type.

In this solution, the second electronic device may obtain the processingtype in advance before receiving the first image file, so that thesecond electronic device can process the first image file based on theprocessing type after receiving the first image file.

In another possible implementation, the third operation is an operationthat a user sets the processing type for the first image file.

In this solution, after the first image file is received, the user mayset the processing type, so that the second electronic device processesthe first image file based on the processing type.

In another possible implementation, the processing data includes thesecond image file.

In another possible implementation, the processing data includes aresult obtained by performing facial recognition based on the firstimage file.

In another possible implementation, the processing data includes alabel, the label corresponds to one folder, and the second image file isin the folder.

In another possible implementation, the method further includes:displaying, by the second electronic device, the second image file basedon the processing data.

In other words, the second electronic device may send the processingdata to the first electronic device to display the second image file, orthe second electronic device may locally display the second image filebased on the processing data.

In another possible implementation, the processing type includes one ormore of image beautification, image classification, image facialrecognition, image clustering, image facial expression recognition,image age analysis, image optical character recognition OCR, or imagesemantic segmentation.

In another possible implementation, after the second electronic deviceobtains the processing data, the method further includes: negotiating,by the second electronic device, with another electronic device aboutthe processing data for the first image file.

In this solution, when there are a plurality of second electronicdevices that process the first image file, processing results obtainedby different second electronic devices may be combined into one completeprocessing result.

According to a fifth aspect, an embodiment of this application providesanother image processing method, including: establishing, by a secondelectronic device, a short-distance connection to a first electronicdevice; receiving, by the second electronic device, a first image filesent by the first electronic device; displaying, by the secondelectronic device, prompt information, where the prompt information isused to prompt a user that the first electronic device requests imageprocessing; processing the first image file to obtain processing data;and sending the processing data to the first electronic device, wherethe processing data is associated with a second image file.

In this solution, after establishing the short-distance connection tothe first electronic device, without an operation of the user, thesecond electronic device may automatically process an image processingrequest of the first electronic device and return processing data.

According to a sixth aspect, an embodiment of this application providesanother image processing method, including: establishing, by a secondelectronic device, a short-distance connection to a first electronicdevice; obtaining, by the second electronic device, a processing typesent by the first electronic device; receiving, by the second electronicdevice, a first image file sent by the first electronic device;displaying, by the second electronic device, prompt information, wherethe prompt information is used to prompt a user that the firstelectronic device requests image processing; when detecting that theuser accepts a third operation requested by the first electronic device,processing, by the second electronic device, the first image file inresponse to the third operation, to obtain processing data, where theprocessing data includes a second image file; negotiating with anotherelectronic device about the processing data for the first image file;and sending the processing data to the first electronic device.

According to a seventh aspect, an embodiment of this applicationprovides a first electronic device, including: a display unit,configured to display a first screen, where the first screen is a camerascreen of the first electronic device; a detection unit, configured todetect a first operation of a user on the first screen; and aphotographing unit, configured to obtain a first image file throughphotographing in response to the first operation, where the image fileincludes a picture or a video. The detection unit is further configuredto detect a second operation of the user on the first screen. Thedisplay unit is further configured to display a second image file inresponse to the second operation, where the second image file isassociated with a result obtained after a second electronic deviceprocesses the first image file.

In a possible implementation, the first electronic device furtherincludes: a sending unit, configured to automatically send the firstimage file to the second electronic device after the photographing unitobtains the first image file through photographing; and a receivingunit, configured to automatically receive processing data sent by thesecond electronic device, where the processing data is obtained by thesecond electronic device by processing the first image file, and theprocessing data is associated with the second image file.

In another possible implementation, the receiving unit is furtherconfigured to: before the photographing unit obtains the first imagefile through photographing, receive a processing type that is set by theuser. The sending unit is further configured to send the processing typeto the second electronic device.

In another possible implementation, the processing data includes thesecond image file.

In another possible implementation, the processing data includes aresult obtained by performing facial recognition based on the firstimage file.

In another possible implementation, the processing type includes one ormore of image beautification, image classification, image facialrecognition, image clustering, image facial expression recognition,image age analysis, image optical character recognition OCR, or imagesemantic segmentation.

In another possible implementation, the first electronic device furtherincludes a connection unit, configured to: before the photographing unitobtains the first image file through photographing, establish ashort-distance connection to the second electronic device.

In another possible implementation, there are a plurality of secondelectronic devices, and the processing data is data obtained bycombining a plurality of pieces of processing data of the plurality ofsecond electronic devices.

In another possible implementation, there are a plurality of processingtypes, and processing data obtained by each second electronic devicecorresponds to at least one of the plurality of processing types.

According to an eighth aspect, an embodiment of this applicationprovides another first electronic device, including: a photographingunit, configured to obtain a first image file through photographing,where the image file includes a picture or a video; a sending unit,configured to send a processing type and the first image file to asecond electronic device when a fourth operation performed by a user forthe first image file is detected; a receiving unit, configured toautomatically receive processing data sent by the second electronicdevice, where the processing data is associated with a second imagefile; and a display unit, configured to display the second image filebased on the processing data.

According to a ninth aspect, an embodiment of this application providesanother first electronic device, including: a connection unit,configured to establish a short-distance connection to a secondelectronic device; a receiving unit, configured to receive a processingtype that is set by a user; a sending unit, configured to send theprocessing type to the second electronic device; a display unit,configured to display a first screen, where the first screen is a camerascreen of the first electronic device; a detection unit, configured todetect a first operation of the user on the first screen; and aphotographing unit, configured to obtain a first image file throughphotographing in response to the first operation, where the image fileincludes a picture or a video. The sending unit is further configured toautomatically send the first image file to the second electronic device.The receiving unit is further configured to automatically receiveprocessing data sent by the second electronic device, where theprocessing data is obtained by the second electronic device byprocessing the first image file, and the processing data includes asecond image file. The detection unit is further configured to detect asecond operation of the user on the first screen. The display unit isfurther configured to display the second image file in response to thesecond operation.

According to a tenth aspect, an embodiment of this application providesa second electronic device, including: a connection unit, configured toestablish a short-distance connection to a first electronic device; areceiving unit, configured to receive a first image file sent by thefirst electronic device, where the image file includes a picture or avideo; a display unit, configured to display prompt information, wherethe prompt information is used to prompt a user that the firstelectronic device requests image processing; a processing unit,configured to: when it is detected that the user accepts a thirdoperation requested by the first electronic device, process the firstimage file in response to the third operation, to obtain processingdata; and a sending unit, configured to send the processing data to thefirst electronic device, where the processing data is associated with asecond image file.

In a possible implementation, the second electronic device furtherincludes an obtaining unit, configured to obtain a processing typebefore the receiving unit receives the first image file sent by thefirst electronic device.

In another possible implementation, the third operation is an operationthat a user sets the processing type for the first image file.

In another possible implementation, the processing data includes thesecond image file.

In another possible implementation, the processing data includes aresult obtained by performing facial recognition based on the firstimage file.

In another possible implementation, the processing data includes alabel, the label corresponds to one folder, and the second image file isin the folder.

In another possible implementation, the processing type includes one ormore of image beautification, image classification, image facialrecognition, image clustering, image facial expression recognition,image age analysis, image optical character recognition OCR, or imagesemantic segmentation.

In another possible implementation, the display unit is furtherconfigured to display the second image file based on the processingdata.

In another possible implementation, the processing unit is furtherconfigured to: after obtaining the processing data, negotiate withanother electronic device about the processing data for the first imagefile.

According to an eleventh aspect, an embodiment of this applicationprovides another second electronic device, including: a connection unit,configured to establish a short-distance connection to a firstelectronic device; a receiving unit, configured to receive a first imagefile sent by the first electronic device; a display unit, configured todisplay prompt information, where the prompt information is used toprompt a user that the first electronic device requests imageprocessing; a processing unit, configured to process the first imagefile to obtain processing data; and a sending unit, configured to sendthe processing data to the first electronic device, where the processingdata is associated with a second image file.

According to a twelfth aspect, an embodiment of this applicationprovides another second electronic device, including: a connection unit,configured to establish a short-distance connection to a firstelectronic device; an obtaining unit, configured to obtain a processingtype sent by the first electronic device; a receiving unit, configuredto receive a first image file sent by the first electronic device; adisplay unit, configured to display prompt information, where the promptinformation is used to prompt a user that the first electronic devicerequests image processing; a processing unit, configured to: when thesecond electronic device detects that the user accepts a third operationrequested by the first electronic device, process the first image filein response to the third operation, to obtain processing data, where theprocessing data includes a second image file; and negotiate with anotherelectronic device about the processing data for the first image file;and a sending unit, configured to send the processing data to the firstelectronic device.

According to a thirteenth aspect, an embodiment of this applicationprovides an electronic device, including one or more processors and oneor more memories. The one or more memories are coupled to the one ormore processors. The one or more memories are configured to storecomputer program code, where the computer program code includes acomputer instruction. When the one or more processors execute thecomputer instruction, the electronic device is enabled to perform theimage processing method according to any one of the possibleimplementations of any one of the foregoing aspects.

According to a fourteenth aspect, an embodiment of this applicationprovides a computer storage medium, including a computer instruction.When the computer instruction is run on an electronic device, theelectronic device is enabled to perform the image processing methodaccording to any one of the possible implementations of any one of theforegoing aspects.

According to a fifteenth aspect, an embodiment of this applicationprovides a computer program product. When the computer program productis run on a computer, the computer is enabled to perform the imageprocessing method according to any one of the possible implementationsof any one of the foregoing aspects.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic diagram of an interconnection scenario accordingto an embodiment of this application;

FIG. 2 is a schematic structural diagram of a mobile phone according toan embodiment of this application;

FIG. 3 a and FIG. 3 b are schematic diagrams of a group of screensaccording to an embodiment of this application;

FIG. 4 a , FIG. 4 b , FIG. 4 c , FIG. 4 d , and FIG. 4 e are schematicdiagrams of another group of screens according to an embodiment of thisapplication;

FIG. 5 a , FIG. 5 b , and FIG. 5 c are schematic diagrams of anothergroup of screens according to an embodiment of this application;

FIG. 6 a , FIG. 6 b , FIG. 6 c , FIG. 6 d , and FIG. 6 e are schematicdiagrams of another group of screens according to an embodiment of thisapplication;

FIG. 7 a , FIG. 7 b , FIG. 7 c , FIG. 7 d , and FIG. 7 e are schematicdiagrams of another group of screens according to an embodiment of thisapplication;

FIG. 8 a , FIG. 8 b , and FIG. 8 c are schematic diagrams of anothergroup of screens according to an embodiment of this application;

FIG. 9 a , FIG. 9 b , FIG. 9 c , and FIG. 9 d are schematic diagrams ofanother group of screens according to an embodiment of this application;

FIG. 10 a and FIG. 10 b are schematic diagrams of another group ofscreens according to an embodiment of this application;

FIG. 11-1 a, FIG. 11-1 b, FIG. 11-1 c, and FIG. 11-1 d are schematicdiagrams of another group of screens according to an embodiment of thisapplication;

FIG. 11-2 a, FIG. 11-2 b, FIG. 11-2 c, FIG. 11-2 d, FIG. 11-2 e, andFIG. 11-2 f are schematic diagrams of another group of screens accordingto an embodiment of this application;

FIG. 12 a , FIG. 12 b , FIG. 12 c , FIG. 12 d , and FIG. 12 e areschematic diagrams of another group of screens according to anembodiment of this application;

FIG. 13 a , FIG. 13 b , and FIG. 13 c are schematic diagrams of anothergroup of screens according to an embodiment of this application;

FIG. 14 a , FIG. 14 b , and FIG. 14 c are schematic diagrams of anothergroup of screens according to an embodiment of this application;

FIG. 15 a , FIG. 15 b , and FIG. 15 c are schematic diagrams of anothergroup of screens according to an embodiment of this application;

FIG. 16 a and FIG. 16 b are schematic diagrams of another group ofscreens according to an embodiment of this application;

FIG. 17 a and FIG. 17 b are schematic diagrams of another group ofscreens according to an embodiment of this application;

FIG. 18 is a schematic diagram of a screen according to an embodiment ofthis application;

FIG. 19-1 is a flowchart of a combination process according to anembodiment of this application;

FIG. 19-2 is a flowchart of another combination process according to anembodiment of this application;

FIG. 19-3 is a flowchart of another combination process according to anembodiment of this application;

FIG. 19-4 is a flowchart of another combination process according to anembodiment of this application;

FIG. 20 is a schematic diagram of a settings screen according to anembodiment of this application;

FIG. 21 a , FIG. 21 b , FIG. 21 c , FIG. 21 d , and FIG. 21 e areschematic diagrams of another group of screens according to anembodiment of this application;

FIG. 22 a , FIG. 22 b , and FIG. 22 c are schematic diagrams of anothergroup of screens according to an embodiment of this application;

FIG. 23 a and FIG. 23 b are schematic diagrams of another group ofscreens according to an embodiment of this application;

FIG. 24 a , FIG. 24 b , FIG. 24 c , and FIG. 24 d are schematic diagramsof another group of screens according to an embodiment of thisapplication;

FIG. 25 a , FIG. 25 b , FIG. 25 c , and FIG. 25 d are schematic diagramsof another group of screens according to an embodiment of thisapplication;

FIG. 26 a , FIG. 26 b , FIG. 26 c , and FIG. 26 d are schematic diagramsof another group of screens according to an embodiment of thisapplication;

FIG. 27 a , FIG. 27 b , and FIG. 27 c are schematic diagrams of anothergroup of screens according to an embodiment of this application;

FIG. 28 is a flowchart of an image processing method according to anembodiment of this application;

FIG. 29 is a flowchart of another image processing method according toan embodiment of this application;

FIG. 30 is a schematic diagram of another screen according to anembodiment of this application;

FIG. 31 is a schematic structural diagram of an electronic deviceaccording to an embodiment of this application; and

FIG. 32 is a schematic structural diagram of another electronic deviceaccording to an embodiment of this application.

DETAILED DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS

For ease of understanding, some concepts related to the embodiments ofthis application are described as an example for reference, which isshown as follows:

Wireless fidelity (wireless fidelity, WiFi) direct: Wireless fidelitydirect is also referred to as WiFi P2P, and is a point-to-pointconnection technology in which electronic devices within a specificrange are directly connected to each other over WiFi to share andexchange content with each other.

Image understanding: Image understanding is semantic understanding of animage, and the image may include a static image, a dynamic image video,a two-dimensional image, a stereoscopic image, or the like.

Natural language: Natural language is language that naturally evolveswith culture, for example, English and Chinese.

Natural language understanding: A computer is used to simulate a humanlanguage communication process, so that the computer can understand anduse natural language of human society, thereby implementing man-computernatural language communication to replace some human brainwork includinginformation querying, question answering, literature excerpting,information compiling, and all natural language information processing.

The following describes the technical solutions in the embodiments ofthis application with reference to the accompanying drawings in theembodiments of this application. In descriptions of the embodiments ofthis application, “/” means “or” unless otherwise specified. Forexample, A/B may represent A or B. In this specification, “and/or”describes only an association relationship for describing associatedobjects and represents that three relationships may exist. For example,A and/or B may represent the following three cases: Only A exists, bothA and B exist, and only B exists. In addition, in the descriptions inthe embodiments of this application, “a plurality of” means two or morethan two.

The following terms “first” and “second” are merely intended for apurpose of description, and shall not be understood as an indication orimplication of relative importance or implicit indication of the numberof indicated technical features. Therefore, a feature limited by “first”or “second” may explicitly or implicitly include one or more features.In the descriptions of the embodiments of this application, unlessotherwise stated, “a plurality of” means two or more than two.

A task sharing method provided in the embodiments of this applicationmay be applied to a scenario in which a plurality of electronic devices01 shown in FIG. 1 are connected based on a communications network. Thecommunications network may be a local area network, or may be a widearea network transferred through a relay (relay) device. When thecommunications network is a local area network, for example, thecommunications network may be a short-distance communications networksuch as a WiFi hotspot network, a WiFi direct network, a Bluetoothnetwork, a ZigBee network, or a near field communication (near fieldcommunication, NFC) network. When the communications network is a widearea network, for example, the communications network may be athird-generation mobile communications technology (3rd-generationwireless telephone technology, 3G) network, a fourth-generation mobilecommunications technology (the 4th generation mobile communicationtechnology, 4G) network, a fifth-generation mobile communicationstechnology (5th-generation mobile communication technology, 5G) network,a future evolved public land mobile network (public land mobile network,PLMN), or the internet. In the scenario shown in FIG. 1 , differentelectronic devices may exchange data with each other over thecommunications network, for example, a picture, a text, a video, or aresult obtained after the electronic devices process an object such as apicture, a text, or a video.

In some embodiments of this application, the electronic device 01 shownin FIG. 1 may be a portable electronic device having another functionsuch as a personal digital assistant function and/or a music playerfunction, for example, a mobile phone, a tablet computer, or a wearabledevice (for example, a smartwatch) having a wireless communicationfunction. An example embodiment of the portable electronic deviceincludes but is not limited to a portable electronic device using iOS®,a portable electronic device using Android®, a portable electronicdevice using Microsoft®, or a portable electronic device using anotheroperating system. The foregoing portable electronic device mayalternatively be another portable electronic device, for example, alaptop (laptop) computer having a touch-sensitive surface (for example,a touch panel). It should be further understood that, in some otherembodiments of this application, the electronic device 01 mayalternatively not be a portable electronic device but a desktop computerhaving a touch-sensitive surface (for example, a touch panel).

For example, as shown in FIG. 2 , the electronic device 01 in theembodiments of this application may be a mobile phone 100. The followingspecifically describes the embodiments by using the mobile phone 100 asan example. It should be understood that the mobile phone 100 shown inFIG. 2 is merely an example of the electronic device 01, and the mobilephone 100 may include more or fewer components than those shown in thefigure, or may combine two or more components, or may have differentcomponent arrangements. Various components shown in the figure may beimplemented on hardware including one or more signal processors and/orapplication-specific integrated circuits, software, or a combination ofhardware and software.

As shown in FIG. 2 , the mobile phone 100 may specifically includecomponents such as one or more processors 101, a radio frequency (radiofrequency, RF) circuit 102, a memory 103, a touchscreen 104, a Bluetoothapparatus 105, one or more sensors 106, a WiFi apparatus 107, apositioning apparatus 108, an audio circuit 109, a peripheral interface110, and a power system 111. These components may communicate with eachother by using one or more communications buses or signal lines (notshown in FIG. 2 ). A person skilled in the art may understand that thehardware structure shown in FIG. 2 does not constitute a limitation onthe mobile phone 100, and the mobile phone 100 may include more or fewercomponents than those shown in the figure, or may combine somecomponents, or may have different component arrangements.

The following specifically describes the components of the mobile phone100 with reference to FIG. 2 .

The processor 101 is a control center of the mobile phone 100. Theprocessor 101 is connected to all parts of the mobile phone 100 by usingvarious interfaces and lines, and performs various functions of themobile phone 100 and processes data by running or executing anapplication stored in the memory 103 and invoking data and aninstruction that are stored in the memory 103. In some embodiments, theprocessor 101 may include one or more processing units. The processor101 may further integrate an application processor and a modemprocessor. The application processor mainly processes an operatingsystem, a user interface, an application, and the like. The modemprocessor mainly processes wireless communication. It can be understoodthat the modem processor may alternatively not be integrated into theprocessor 101. For example, the processor 101 may be a Kirin 960 chipmanufactured by Huawei. In some embodiments of this application, theprocessor 101 may further include a fingerprint verification chip,configured to verify a collected fingerprint.

In some other embodiments of this application, the processor 101 mayfurther include an AI chip. Learning and processing capabilities of theAI chip include an image understanding capability, a natural languageunderstanding capability, a speech recognition capability, and the like.The AI chip may enable the mobile phone 100 to have better performance,a longer battery life, and better security and privacy. For example, ifthe mobile phone 100 processes data over cloud, the mobile phone 100needs to upload the data for processing and then a result is returned,and consequently efficiency is very low under a prior-art condition. Ifthe mobile phone 100 has a relatively strong AI learning capability, themobile phone 100 does not need to upload data to cloud, but directlylocally processes the data. Therefore, data security and privacy can beimproved while processing efficiency is improved.

The radio frequency circuit 102 may be configured to receive and send aradio signal in an information receiving and sending process or in acall process. Specifically, after receiving downlink data from a basestation, the radio frequency circuit 102 may send the downlink data tothe processor 101 for processing. In addition, the radio frequencycircuit 102 sends uplink data to the base station. Generally, the radiofrequency circuit includes but is not limited to an antenna, at leastone amplifier, a transceiver, a coupler, a low noise amplifier, aduplexer, and the like. In addition, the radio frequency circuit 102 mayfurther communicate with another device through wireless communication.The wireless communication may use any communication standard orprotocol, including but not limited to a global system for mobilecommunications, a general packet radio service, code division multipleaccess, wideband code division multiple access, long term evolution, anemail, a short message service, and the like.

The memory 103 is configured to store the application and the data. Theprocessor 101 performs various functions of the mobile phone 100 andprocesses data by running the application and the data that are storedin the memory 103. The memory 103 mainly includes a program storage areaand a data storage area. The program storage area may store an operatingsystem, and an application required by at least one function (forexample, a sound playback function or an image play function). The datastorage area may store data (for example, audio data or a phone book)created when the mobile phone 100 is used. In addition, the memory 103may include a high-speed random access memory, or may include anonvolatile memory, such as a magnetic disk storage device, a flashmemory, or another nonvolatile solid-state storage device. The memory103 may store various operating systems, for example, an IOS® operatingsystem developed by Apple and an Android® operating system developed byGoogle. For example, the memory 103 stores an application related to theembodiments of this application, for example, taskcard store, Twitter,Phone, Weibo, or WeChat. The memory 103 further stores information thatmay be related to registration and login in the embodiments of thisapplication, for example, user name information.

The touchscreen 104 may include a touch-sensitive surface 104-1 and adisplay 104-2. The touch-sensitive surface 104-1 (for example, a touchpanel) may collect a touch event performed by a user of the mobile phone100 on or near the touch-sensitive surface 104-1 (for example, anoperation performed by the user on the touch-sensitive surface 104-1 ornear the touch-sensitive surface 104-1 by using any proper object suchas a finger or a stylus), and send collected touch information toanother component such as the processor 101. The touch event performedby the user near the touch-sensitive surface 104-1 may be referred to asfloating touch. The floating touch may mean that the user does not needto directly come into contact with a touchpad to select, move, or drag atarget (for example, an application (application, APP) icon), and theuser only needs to be located near the mobile phone 100 to perform adesired function. In a floating touch application scenario, terms suchas “touch” and “contact” do not implicitly mean to directly come intocontact with the touchscreen 104, but to be near or close to thetouchscreen 104. The touch-sensitive surface 104-1 that can performfloating touch may be implemented in a capacitive manner, an infraredsensing manner, an ultrasonic wave manner, or the like. Thetouch-sensitive surface 104-1 may include two parts: a touch detectionapparatus and a touch controller. The touch detection apparatus detectsa touch orientation of the user, detects a signal generated by a touchoperation, and transmits the signal to the touch controller. The touchcontroller receives touch information from the touch detectionapparatus, converts the touch information into touch point coordinates,and then sends the touch point coordinates to the processor 101. Thetouch controller may further receive an instruction sent by theprocessor 101, and execute the instruction. In addition, thetouch-sensitive surface 104-1 may be implemented in a plurality oftypes, such as a resistive type, a capacitive type, an infrared type,and a surface acoustic wave type. The display (also referred to as adisplay screen) 104-2 may be configured to display information enteredby the user or information provided for the user, and various menus ofthe mobile phone 100. The display 104-2 may be configured in a form of aliquid crystal display, an organic light emitting diode, or the like.The touch-sensitive surface 104-1 may cover the display 104-2. Afterdetecting a touch event on or near the touch-sensitive surface 104-1,the touch-sensitive surface 104-1 transmits the touch event to theprocessor 101 to determine a type of the touch event. Then, theprocessor 101 may provide a corresponding visual output on the display104-2 based on the type of the touch event. In FIG. 2 , thetouch-sensitive surface 104-1 and the display screen 104-2 are used astwo independent parts to implement input and output functions of themobile phone 100. However, in some embodiments, the touch-sensitivesurface 104-1 and the display screen 104-2 may be integrated toimplement the input and output functions of the mobile phone 100. It canbe understood that the touchscreen 104 is formed by stacking a pluralityof layers of materials. In the embodiments of this application, only thetouch-sensitive surface (layer) and the display screen (layer) aredisplayed, and another layer is not described in detail in theembodiments of this application. In addition, in some other embodimentsof this application, the touch-sensitive surface 104-1 may cover thedisplay 104-2, and a size of the touch-sensitive surface 104-1 isgreater than a size of the display screen 104-2. Therefore, the displayscreen 104-2 is entirely covered below by the touch-sensitive surface104-1. Alternatively, the touch-sensitive surface 104-1 may be disposedon the front of the mobile phone 100 in a full panel form. In otherwords, any touch performed by the user on the front of the mobile phone100 can be sensed by the mobile phone. In this way, full touchexperience on the front of the mobile phone can be implemented. In someother embodiments, the touch-sensitive surface 104-1 is disposed on thefront of the mobile phone 100 in a full panel form, and the displayscreen 104-2 may also be disposed on the front of the mobile phone 100in a full panel form. In this way, a bezel-less structure on the frontof the mobile phone can be implemented. In some other embodiments ofthis application, the touchscreen 104 may further include a series ofpressure sensor arrays, so that the mobile phone can sense pressureexerted on the touchscreen 104 by a touch event.

The mobile phone 100 may further include the Bluetooth apparatus 105,configured to implement data exchange between the mobile phone 100 andanother short-distance electronic device (for example, a mobile phone ora smartwatch). In the embodiments of this application, the Bluetoothapparatus may be an integrated circuit, a Bluetooth chip, or the like.

The mobile phone 100 may further include the at least one sensor 106,for example, an optical sensor, a motion sensor, and another sensor.Specifically, the optical sensor may include an ambient light sensor anda proximity sensor. The ambient light sensor may adjust luminance of thedisplay of the touchscreen 104 based on ambient light luminance. Theproximity sensor may power off the display when the mobile phone 100approaches an ear. As one of motion sensors, an accelerometer sensor maydetect a magnitude of acceleration in each direction (usually, in threeaxes), may detect a magnitude and a direction of gravity when theaccelerometer sensor is stationary, and may be used in an applicationfor identifying a posture of the mobile phone (for example, screenswitching between a landscape mode and a portrait mode, a related game,and magnetometer posture calibration), a vibrationidentification-related function (for example, a pedometer or a knock),and the like.

In some embodiments of this application, the sensor 106 may furtherinclude a fingerprint sensor. For example, the fingerprint sensor may bedisposed on the back of the mobile phone 100 (for example, below arear-facing camera), or the fingerprint sensor is disposed on the frontof the mobile phone 100 (for example, below the touchscreen 104). Inaddition, the fingerprint sensor may be disposed on the touchscreen 104to implement a fingerprint recognition function. In other words, thefingerprint sensor may be integrated with the touchscreen 104 toimplement the fingerprint recognition function of the mobile phone 100.In this case, the fingerprint sensor may be disposed on the touchscreen104 as a part of the touchscreen 104, or may be disposed on thetouchscreen 104 in another manner. In addition, the fingerprint sensormay be further implemented as a full-panel fingerprint sensor. In thiscase, the touchscreen 104 may be considered as a panel on which afingerprint may be collected at any position. The fingerprint sensor maysend a collected fingerprint to the processor 101, so that the processor101 processes the fingerprint (for example, verifies the fingerprint).The fingerprint sensor in the embodiments of this application may useany type of sensing technology, including but not limited to an opticalsensing technology, a capacitive sensing technology, a piezoelectricsensing technology, an ultrasonic sensing technology, and the like.

In addition, another sensor such as a gyroscope, a barometer, ahygrometer, a thermometer, or an infrared sensor may be further disposedon the mobile phone 100. Details are not described herein.

The WiFi apparatus 107 is configured to provide network access complyingwith a WiFi-related standard protocol for the mobile phone 100. Themobile phone 100 may access a WiFi access point by using the WiFiapparatus 107, to help the user receive and send an email, browse a webpage, access streaming media, and the like. The WiFi apparatus 107provides wireless broadband internet access for the user. In some otherembodiments, the WiFi apparatus 107 may also be used as a WiFi wirelessaccess point, and may provide WiFi network access for another electronicdevice.

The positioning apparatus 108 is configured to provide a geographicallocation for the mobile phone 100. It can be understood that thepositioning apparatus 108 may be specifically a receiver of apositioning system such as a global positioning system (globalpositioning system, GPS) or a BeiDou navigation satellite system. Afterreceiving a geographical location sent by the foregoing positioningsystem, the positioning apparatus 108 sends the information to theprocessor 101 for processing, or sends the information to the memory 103for storage. In some other embodiments, the positioning apparatus 108may be a receiver of an assisted global positioning system (assistedglobal positioning system, AGPS). The AGPS runs in a manner in which GPSpositioning is performed with mobile assistance. By using a signal ofthe base station together with a GPS satellite signal, the AGPS canenable a positioning speed of the mobile phone 100 to be faster. In theAGPS system, the positioning apparatus 108 may obtain positioningassistance through communication with an assisted positioning server(for example, a positioning server of the mobile phone 100). The AGPSsystem serving as an assisted server assists the positioning apparatus108 in completing ranging and positioning services. In this case, theassisted positioning server communicates with the positioning apparatus108 (that is, the receiver of the GPS) of the mobile phone 100 by usinga wireless communications network. In some other embodiments, thepositioning apparatus 108 may alternatively be a positioning technologythat is based on a WiFi access point. Because each WiFi access point hasa globally unique MAC address, the mobile phone 100 may scan and collectbroadcast signals from surrounding WiFi access points when WiFi isenabled, and therefore can obtain MAC addresses that are broadcast bythe WiFi access points. The mobile phone 100 sends, to a location serverby using a wireless communications network, data (for example, the MACaddresses) that can identify the WiFi access points. The location serverobtains a geographical location of each WiFi access point throughretrieval, obtains a geographical location of the mobile phone 100through calculation with reference to strength of the WiFi broadcastsignals, and sends the geographical location to the positioningapparatus 108 of the mobile phone 100.

The audio circuit 109, a speaker 112, and a microphone 113 may providean audio interface between the user and the mobile phone 100. The audiocircuit 109 may convert received audio data into an electrical signaland transmit the electrical signal to the speaker 112, and the speaker112 converts the electrical signal into a sound signal for output. Inaddition, the microphone 113 converts a collected sound signal into anelectrical signal, and the audio circuit 109 receives the electricalsignal, converts the electrical signal into audio data, and then outputsthe audio data to the RF circuit 102, to send the audio data to, forexample, another mobile phone, or outputs the audio data to the memory103 for further processing.

The peripheral interface 110 is configured to provide various interfacesfor an external input/output device (for example, a keyboard, a mouse,an external display, an external memory, or a subscriber identity modulecard). For example, the mobile phone 100 is connected to the mouse byusing a universal serial bus interface, and is connected to a subscriberidentity module (subscriber identity module, SIM) card provided by atelecommunications operator, by using a metal contact on a card slot ofthe subscriber identity module card. The peripheral interface 110 may beconfigured to couple the external input/output peripheral device to theprocessor 101 and the memory 103.

It can be understood that the mobile phone 100 may further include thepower system 111 (for example, a battery and a power management chip)that supplies power to the components. The battery may be logicallyconnected to the processor 101 by using the power management chip, toimplement functions such as charging and discharging management andpower consumption management by using the power system 111.

Although not shown in FIG. 2 , the mobile phone 100 may further includea camera, for example, a front-facing camera or a rear-facing camera.The front-facing camera may be configured to capture facial featureinformation. The processor 101 may perform facial recognition on thefacial feature information, to perform subsequent processing. The mobilephone 100 may further include a flash, a micro projection apparatus, anear field communication (near field communication, NFC) apparatus, andthe like. Details are not described herein.

FIG. 3 a shows a user interface 300 displayed on the touchscreen in themobile phone 100. The user interface 300 may include a status bar 303, anavigation bar 306 that can be hidden, and a time and weather widget.The user interface 300 further includes a plurality of applicationicons, for example, an icon 304 of Weibo, an icon 305 of Alipay, an icon302 of Camera, and an icon 301 of WeChat. The status bar 303 may includea name of an operator (for example, China Mobile), a time, a WiFi icon,signal strength, and an amount of current residual power. The navigationbar 306 may include a back (back) button icon, a home screen buttonicon, a forward button icon, and the like. In addition, it can beunderstood that, in some other embodiments, the status bar 303 mayfurther include a Bluetooth icon, a mobile network (for example, 4G), analarm icon, an icon of a connected device, and the like. It can befurther understood that, in some other embodiments, the user interface300 shown in FIG. 3 a may further include a dock bar, and the dock barmay include an icon of a frequently used APP, and the like. After themobile phone detects a touch event performed by using a finger of theuser (or a stylus or the like) on an icon of a specific APP, in responseto the touch event, the mobile phone may open a user interface of theAPP corresponding to the APP icon. For example, after the mobile phonedetects an event that the user touches the icon 302 of Camera by using afinger, in response to the event that the user touches the icon 302 ofCamera by using the finger 307, the mobile phone opens a camera servicescreen shown in FIG. 3 b.

In some other embodiments, the mobile phone 100 may further include ahome screen button. The home screen button may be a physical button, ormay be a virtual button. The home screen button is configured to enablea GUI displayed on the touchscreen to return to a specific page of ahome screen based on an operation of the user, so that the user canconveniently view the home screen and operate a control (for example, anicon) on the home screen at any time. The foregoing operation may bespecifically that the user taps the home screen button, or the userdouble taps the home screen button, or the user taps and holds the homescreen button. In some other embodiments of this application, the homescreen button may further integrate a fingerprint sensor. Therefore,when the user taps the home screen button, the electronic device mayaccordingly collect a fingerprint to confirm an identity of the user.

All the following embodiments may be implemented in the electronicdevice 01 (for example, the mobile phone 100 or a tablet computer)having the foregoing hardware structure. In the following embodiments,an example in which the electronic device 01 is the mobile phone 100 isused to describe the task sharing method provided in the embodiments ofthis application.

According to the task sharing method provided in the embodiments of thisapplication, results obtained after different electronic devices processa same task and capabilities (referred to as task processingcapabilities below) of local ends of a plurality of connected electronicdevices for processing the task may be shared between the plurality ofelectronic devices. A task processing capability of an electronic devicemeans various processing functions of the electronic device, forexample, a processing capability, a storage capability, or acommunication capability of an AI chip. The electronic device may havedifferent task processing capabilities for processing different tasks.For example, the AI chip of the electronic device may have processingcapabilities including an image understanding capability, a naturallanguage understanding capability, and a speech recognition capability.Based on the image understanding capability of the AI chip, theelectronic device may execute tasks including an image beautificationtask, an image classification task, an image facial recognition task, animage clustering task, an image facial expression recognition task, animage age analysis task, an image optical character recognition (opticalcharacter recognition, OCR) task, an image semantic segmentation task,and the like. Based on the natural language understanding capability ofthe AI chip, the electronic device may execute tasks including a texttranslation task, a text intent recognition task, an entity extractiontask, and the like.

In a plurality of connected electronic devices, when a low-end devicehaving no task processing capability or having a relatively poor taskprocessing capability shares a task processing result of a high-enddevice, it can be understood that the low-end device borrows the taskprocessing capability of the high-end device. For example, a high-enddevice may be Huawei Mate 10 Pro, and a low-end device may be HuaweiEnjoy 5. For a situation of comparing a hardware configuration and aphotographing processing function of Huawei Mate 10 Pro with those ofHuawei Enjoy 5, refer to Table 1. The hardware configuration of HuaweiMate 10 Pro is higher than that of Huawei Enjoy 5, and the photographingprocessing capability of Huawei Mate 10 Pro is also stronger than thatof Huawei Enjoy 5. Therefore, Huawei Enjoy 5 can use a task processingcapability of Huawei Mate 10 Pro.

TABLE 1 Model Huawei Mate 10 Pro Huawei Enjoy 5 Processor CPU model:Kirin 970 CPU; Quantity of cores: 64-bit kernel, 8; Co-processor i7CPU;MT6735 Dominant frequency: 4xCortex-A73, 2.36 GHz, 4xCortex-A53, 1.8GHz; GPU: Mali-G72 MP12; NPU: neural processing unit Memory Operationmemory (RAM): 6 GB; Device RAM: 2 GB memory (ROM): 64 GB/128 GB ROM: 16GB Battery Support a maximum of 4000 mAh charging Capacity: 4000 currentof 5 A; 3G call: up to 25 hours; 4G web mAh browsing: up to 22 hours;Video playback: up to 22 hours; Audio playback: up to 80 hours; Standbytime: up to 22 days Photographing Rear-facing camera: 12 MP (color) +20MP Rear-facing hardware (black and white), f/1.6, Leica lens, and OIScamera: 13 MP; optical image stabilizer; Front-facing camera: 8Front-facing MP, f/2.0; Sensor type: BSI CMOS flash: dual- camera: 5 MPLED flash Photographing Video shooting: The rear-facing camera —processing supports a maximum of 4K (3840 × 2160) 30 fps, function andthe front-facing camera supports a maximum of FHD (1920 × 1080) 30 fps.The rear-facing camera supports 720 p@240 fps slow lens. Zoom mode: 2xdual-camera zoom; Photographing mode: AI scene recognition, 3D dynamicpanorama, wide aperture, 2x dual- camera zoom, monochrome camera, slowmotion, light painting (including tail light trails, light graffiti,silky water, and star track), super night mode, pro mode, portrait mode,perfect selfie, beauty video, panorama, HDR, ultra snapshot, capturesmiles, audio control, timer photo, touch to capture, watermark,document correction, and time-lapse; Autofocus: PDAF laser depth CAFhybrid autofocus (rear-facing camera); Photo resolution: up to 5120 ×3840 pixels

With reference to the accompanying drawings and application scenarios, atask that can be executed by the AI chip is mainly used as an examplebelow to describe in detail the task sharing method provided in theembodiments of this application.

Application scenario 1: A to-be-executed task is a non-real-time andnon-consecutive task. The non-real-time and non-consecutive task is atask that processing does not need to be continuously performed for aplurality of times and processing results are obtained in real time, forexample, a task of processing an obtained picture or an obtained text,or a task of processing a shot video. The electronic device may executedifferent tasks for different to-be-processed objects.

An example in which a to-be-processed object in a to-be-executed task isa picture is used below to describe the task sharing method provided inthe embodiments of this application. The picture may be a pictureobtained by an electronic device 1 through photographing, or may be apicture stored in the electronic device 1, or may be a picture receivedby the electronic device 1 from another device. Tasks corresponding tothe picture may include image beautification, image classification,image facial recognition, image clustering, image facial expressionrecognition, image age analysis, image OCR recognition, image semanticsegmentation, and the like.

For example, in response to an operation that a user 1 taps the icon 302of Camera shown in FIG. 3 a , the electronic device 1 displays aphotographing screen shown in FIG. 4 a . Referring to FIG. 4 b , theelectronic device 1 obtains a first picture 401 through photographing(for example, through self-portrait photographing). When the electronicdevice 1 detects an operation (for example, a tap operation) performedby the user 1 on the first picture 401 on a photographing screen in FIG.4 b , or as shown in FIG. 4 c , when the electronic device 1 detects anoperation performed by the user on the first picture 401 in an album, inresponse to the operation, the electronic device 1 displays a sharingoption 402 shown in FIG. 4 d . Referring to FIG. 4 e , when the user 1selects the sharing option 402, the electronic device 1 displays asharing list 403, and the sharing list 403 includes a manner of sharingthe first picture 401.

The sharing manner may include an APP sharing manner such as WeChatsharing, QQ sharing, facebook sharing, or Shared APP sharing, and anetwork sharing manner such as Bluetooth sharing, WiFi hotspot sharing,WiFi direct sharing, or NFC sharing.

First, the APP sharing manner is described.

In some embodiments of this application, when the user 1 selects one APPsharing manner (for example, WeChat sending or Shared APP sending) fromthe sharing list 403, the user 1 may select to send the first picture401 to one or more friends, and the user 1 may further notify otherelectronic devices of the one or more friends of a processing task forthe first picture 401 by using an APP.

For example, referring to FIG. 5 a to FIG. 5 c , when the user 1,namely, Lisa 501, selects Shared APP sharing from the sharing list 403,the user 1 may select a friend Emmy 502 and send the first picture 401to Emmy 502, and the user 1 may further notify the friend of theto-be-processed task by using a voice or a text. For example, referringto FIG. 5 c , the user 1 may send a WeChat message to request the friendto perform AI enhancement on the first picture 401. In other words, theto-be-processed task for the first picture 401 is “AI enhancement”.Alternatively, the user 1 may call the friend to request the friend toperform AI enhancement on the first picture 401. Alternatively, if thefriend is around, the user 1 may orally request the friend to perform AIenhancement on the first picture 401.

The AI enhancement may be image beautification. For example, the AIenhancement may be identifying different entities in an image andperforming enhancement processing on the different entities, forexample, making sky more blue, making grass more green, and performingfacial beautification. For example, during facial beautification, the AIenhancement may include filter processing and skin smoothing processing.The AI enhancement may be performing facial three-dimensionalenhancement, performing bodybuilding, face slimming, and the likethrough optical distortion correction, making brightness of the facemore natural through light compensation, and the like.

It should be noted that, on an APP message display screen provided inthe embodiments of this application, a message on the right side is sentby a user by using a current electronic device, and a message on theleft side is sent by a friend by using another electronic device. Forexample, in FIG. 5 c , a message on the right is sent by the currentuser Lisa to the friend Emmy.

After receiving the first picture, the friend Emmy may perform AIenhancement on the first picture by using an electronic device 2. Afterthe electronic device 2 performs AI enhancement on the first picture,Emmy returns a second picture obtained after processing to the user 1Lisa.

For example, referring to FIG. 6 a to FIG. 6 c , when the electronicdevice 2 used by Emmy detects a first preset gesture (for example, atouch and hold gesture) of Emmy (a user 2) for the first picture 401,the electronic device 2 displays a prompt box 601. Referring to FIG. 6 d, when the user 2 selects an editing option 602 in the prompt box 601,the electronic device 2 displays a task list 603. The task list 603includes picture processing operations, for example, options such as AIenhancement 605, picture classification, picture clustering, and imagefacial recognition. For another example, referring to FIG. 6 b and FIG.6 e , when the electronic device 2 detects a preset gesture (forexample, a touch and hold gesture) of the user 2 for the first picture401, the electronic device 2 displays a task list 604. The task list 604may include options such as AI enhancement 605, OCR recognition, imageclassification, and image clustering.

Referring to FIG. 7 a and FIG. 7 b , when the user 2 selects the optionof AI enhancement 605, the electronic device 2 performs AI enhancementon the first picture 401, to obtain the second picture 701 afterprocessing, and the electronic device 2 may store the second picture 701after completing AI enhancement. Referring to FIG. 7 b and FIG. 7 d ,after completing AI enhancement, the electronic device 2 mayautomatically reply return the second picture 701 to the electronicdevice 1 used by the user 1 Lisa. Referring to FIG. 7 c and FIG. 7 d ,after completing AI enhancement, the electronic device 2 may return toan APP chat screen, so that the user 2 sends the second picture to theuser 1 Lisa by tapping an add option 702 to select the second picturefrom an album, or the like. Alternatively, referring to FIG. 7 e andFIG. 7 d , after completing AI enhancement, the electronic device 2 maydisplay a “Reply to friend” button 703. When the user 2 taps the “Replyto friend” button 703, the electronic device 2 sends the second picture701 to the electronic device 1 used by the user 1 Lisa.

In some embodiments of this application, a first mark may be displayedon the second picture 701 obtained after AI enhancement, or firstattribute information may be displayed in attribute information of thesecond picture 701. The first mark and the first attribute informationare used to notify the user that the picture is a picture obtained afterAI enhancement. For example, referring to FIG. 9 a , the first mark 801may be an “AI enhancement” character displayed at the upper left cornerof the second picture 701. For another example, the first mark mayinclude a model of a device that has processed the picture. For example,the first mark may be “AI enhancement by Mate 10 Pro”. For anotherexample, the first mark may alternatively be displayed in a watermarkingmanner. When the second picture 701 is tapped, the first mark 801 maydisappear, and when the second picture 701 is tapped again, the firstmark 801 may appear again. For example, referring to FIG. 8 b , a firstattribute 802 may be “processing device: Huawei Mate 10 Pro; Processing:AI enhancement” in the attribute information. It can be understood thatthe first mark and the first attribute information displayed on thesecond picture may vary with task processing that is performed to obtainthe second picture. For example, the first mark displayed on the secondpicture 701 obtained after image classification task processing may bean image classification result. As shown in FIG. 8 c , the first mark801 is a “Wedding dress photo”.

In some other embodiments of this application, the user 1 mayalternatively send the first picture 401 to a friend by using an addbutton in an APP chat screen (for example, a control 702 displayed inFIG. 7 c ), to display a screen shown in FIG. 5 c . Further, the firstpicture 401 may be processed based on the processes shown in FIG. 6 a toFIG. 8 c.

In some other embodiments of this application, referring to FIG. 9 a andFIG. 9 b , the electronic device 1 may display a task setting option901. When the user 1 taps the task setting option 901, the electronicdevice 1 displays a task list 902. It is assumed that the user 1 selectsone task (for example, AI enhancement) from the task list 902. In onecase, the electronic device 1 sends the to-be-processed task to anotherelectronic device, and displays task information in chat information.For example, the task information 903 may be specifically “AIenhancement requested” shown in FIG. 9 c . In another case, referring toFIG. 9 d , the electronic device 1 sends the processing task to anotherelectronic device, but does not display task information.

Referring to FIG. 10 a , after receiving the first picture 401 and theto-be-processed task that are sent by the electronic device 1, theelectronic device 2 may automatically process the first picture 401based on the to-be-processed task, and the electronic device 2 mayfurther prompt the user 2 with specific content of the to-be-processedtask.

Alternatively, referring to FIG. 10 b , after receiving the firstpicture 401 and the to-be-processed task that are sent by the electronicdevice 1, the electronic device 2 may display prompt information 1001,to prompt the user 2 whether to accept the to-be-processed task. Afterthe user 2 selects “Accept”, the electronic device 2 processes the firstpicture 401. After the user selects “Decline”, the electronic device 2does not process the first picture 401, and the user 2 may further senda reject request message to the user 1. If the user 2 is relatively busycurrently or the electronic device 2 has a relatively large quantity oftasks currently, the user 2 may select “Remind later”. After the user 2selects “Remind later”, the electronic device 2 may remind, after aperiod of time, the user again whether to accept the processing task.

After processing the first picture 401 based on the to-be-processedtask, the electronic device 2 may automatically send the second picture701 obtained after processing to the electronic device 1, or may sendthe second picture 701 to the electronic device 1 after receiving aninstruction of the user 2.

After receiving the second picture 701, the electronic device 1 mayperform displaying based on the second picture 701. For example, theelectronic device 1 may replace the first picture 401 with the secondpicture 701. In other words, the electronic device 1 displays only thesecond picture 701 instead of the first picture 401. Alternatively, theelectronic device 1 may display both the first picture 401 and thesecond picture 701.

For example, as shown in FIG. 11-1 a or FIG. 11-1 c, after obtaining thesecond picture 701, the electronic device 1 may automatically update thefirst picture 401 obtained through photographing to the second picture701. For example, as shown in FIG. 11-1 b, the album may include promptinformation 1102, and the prompt information is used to prompt the userthat AI enhancement is being performed. In this case, the user may learnthat the electronic device 1 freezes without a fault or the like. AfterAI enhancement is completed, as shown in FIG. 11-1 c, the second picture701 obtained after processing is displayed in the album. For example, asshown in FIG. 11-1 d, the first picture 401 and the prompt information1102 may be displayed in the album.

For example, after the electronic device 1 obtains the first picturethrough photographing, when the user taps a thumbnail 1101 at the lowerleft corner in FIG. 11-2 a, as shown in FIG. 11-2 b, FIG. 11-2 e, orFIG. 11-2 f, the electronic device 1 displays the first picture 401 andthe prompt information 1102, and the prompt information is used toprompt the user that AI enhancement is being performed. After AIenhancement is completed, as shown in FIG. 11-2 c, the electronic device1 may display the second picture 701 obtained after AI enhancement. Whenthe user 1 taps the first picture 401 in FIG. 11-2 c, as shown in FIG.11-2 d, the electronic device 1 may switch display locations of thefirst picture 401 and the second picture 402, to display the firstpicture 401 in a scaling up manner and display the second picture 701 ina scaling down manner.

In some other embodiments of this application, the electronic device 1may alternatively send the first picture 401 to a plurality of otherelectronic devices by using an APP.

For example, when the user selects a family group in FIG. 5 b ,referring to FIG. 12 a , the user 1 may send, in the family group, thefirst picture 401 to a plurality of electronic devices used by users inthe family group. For example, the family group includes Lisa, herbrother, her mother, and her father. Referring to FIG. 12 b , afterreceiving the first picture 401, electronic devices of her brother,father, and mother each may display prompt information 1001, to prompteach of the users whether to accept the processing task.

In one case, an electronic device that first selects “Accept” performstask processing, and other electronic devices do not perform serviceprocessing. For example, referring to FIG. 12 c , her brother firstaccepts an AI enhancement task from Lisa. Referring to FIG. 12 d ,electronic devices of her father and mother do not display a promptindicating whether to accept the request. After completing AIenhancement, her brother replies to Lisa with the second picture 701obtained after processing. Referring to FIG. 12 d and FIG. 12 e , promptinformation is displayed in the group: Brother has accepted the AIenhancement task. For another example, in electronic devices that arecapable of processing the task in the group, an electronic device thatis currently idlest or that currently has a largest amount of powerautomatically accepts the processing task for the first picture 401, andother electronic devices do not accept the processing task.

In another case, each electronic device that receives the first picture401 accepts the processing task for the first picture 401. For example,after her brother in the family group accepts the AI enhancement task,the electronic devices of her father and the mother either may continueto display the prompt information 1001, to prompt either of the userswhether to accept the processing task. For another example, eachelectronic device that is capable of processing the task in the groupautomatically accepts the processing task for the first picture 401after receiving the first picture 401.

In some embodiments of this application, in one case, if a specificelectronic device in the group does not support an AI enhancementfunction, the electronic device may display the prompt information low,and when a user taps “Accept”, the user is prompted that the currentdevice does not support the task. For example, after Lisa requests theAI enhancement task, if an electronic device of her father does notsupport the AI enhancement function, referring to FIG. 13 a and FIG. 13b , when her father taps “Accept”, the electronic device displays theprompt information 1301 to prompt the user that the task cannot beaccepted.

In another case, if a specific electronic device in the group does notsupport an AI enhancement function, the electronic device may displayonly task request information, but does not display information used toprompt the user whether to accept the task request. For example, afterLisa requests AI enhancement, if the electronic device of her fatherdoes not support the AI enhancement function, referring to FIG. 13 c ,the electronic device of her father does not display prompt informationindicating whether to accept task processing.

After completing the task, the electronic device that accepts taskprocessing may return the obtained second picture 701 to the electronicdevice 1. The electronic device that accepts task processing may storethe second picture 701, or may delete the second picture 701 aftersending the second picture 701 to another electronic device. In onecase, only the electronic device 1 can receive the second picture 701.In another case, the electronic devices of all the users in the groupcan receive the second picture 701. For example, when the electronicdevice that accepts task processing is the electronic device 2 used byher brother, electronic devices used by Lisa, her mother, and her fatherin the group may all receive the second picture 701 obtained afterprocessing. After receiving the second picture 701, the electronicdevices of the users in the group each may replace the first picture 401with the second picture 701, or may store both the first picture 401 andthe second picture 701.

It is assumed that there are a plurality of electronic devices thataccept task processing. In one case, the electronic device 1 receivesonly a second picture that is processed and returned first, and thendoes not receive a second picture that is processed and returned byanother electronic device. In another case, the electronic device 1receives second pictures processed and returned by the plurality ofelectronic devices. After receiving the second pictures returned by aplurality of other electronic devices, the electronic device 1 may storeall the second pictures, or may select, according to an instruction ofthe user 1, a second picture with a best effect for storage.

In some other embodiments of this application, the electronic device mayfurther collect statistics about a task requested by another electronicdevice. The user may select to delete or disable a sharing relationshipbetween the electronic device and another electronic device. Therefore,the electronic device does not help the another electronic device toperform task processing. For example, in the family group shown in FIG.12 a to FIG. 12 e , when the electronic device 2 finds that theelectronic device 1 requests a relatively large quantity of tasks, theelectronic device 1 consumes a relatively large quantity of resourcesand a relatively large amount of power of the electronic device 2, andthe user may select to delete, in the family group by using theelectronic device 2, a shared picture from the user Lisa using theelectronic device 1. In this way, the electronic device 2 does not helpthe electronic device 1 to perform task processing.

An example in which the electronic device 1 sends the first picture 401to a plurality of electronic devices in a group manner and requests taskprocessing is used below for description. As an alternative solution ofthe foregoing group, as shown in FIG. 14 a to FIG. 14 c , the electronicdevice 1 may alternatively send, in response to a selection operationperformed by the user 1 for a plurality of friends, the first picture toelectronic devices used by the plurality of friends. Details are notdescribed herein again.

In some embodiments of this application, the user 1 may want to obtain,as soon as possible, the second picture obtained after processing. Forexample, the electronic device 1 of the user 1 Lisa has a relativelypoor AI enhancement effect. Lisa is wearing a wedding dress, and Lisawants to take a satisfactory photo and show the photo to her friend.Because a time for wearing the wedding dress is limited, Lisa needs toobtain, as soon as possible, a photo with a better effect obtained afterAI enhancement.

In this case, the user 1 may notify another electronic device of amission critical requirement. For example, the user 1 may prompt anotheruser in a chat that the task is “mission critical”. Alternatively, tasksettings 901 may include a “mission critical” option. When the user 1selects the “mission critical” option, an electronic device of anotheruser may display the following: The task is “mission critical”.Alternatively, to remind a user in real time, after receiving a taskrequest, another electronic device may remind, in a relatively obviousmanner such as a sound or light manner, the user whether to immediatelyprocess the task request from a friend. For example, an electronicdevice may prompt a user of “Receive a mission critical request from afriend” by using a voice, or an electronic device prompts a user of“Receive a mission critical request from a friend” on a desktopnotification bar.

An example in which a to-be-processed task for a picture is AIenhancement is used below for description. A picture processing task mayalso be image classification, image clustering, OCR recognition, or thelike. For example, when Lisa and her family members travel abroad andLisa takes a family group photo, if the electronic device of Lisa doesnot have a face clustering processing capability, Lisa may request herfamily members in a family group to perform face clustering taskprocessing, and then her brother performs face clustering processing onthe family group photo, so that Lisa and other family members each canobtain a face clustering result. Therefore, the family members can sortand view the taken photo based on the clustering result. For example,the face clustering result is that the picture includes a face of Lisa,a face of her father, a face of her mother, and a face of her brother.In this way, the photo is separately aggregated in a father photo set, amother photo set, a brother photo set, and a Lisa photo set in theelectronic device 1. For another example, it is assumed that Lisa andher family members travel abroad, and the electronic device of Lisa doesnot have an OCR recognition capability and a local translationcapability. In this case, when seeing an unknown street name or menuname, Lisa may take a photo of the street name or the menu name andrequest her family members in a family group to perform OCR recognition,and then her brother performs OCR recognition processing on the picture,so that Lisa and other family members each can obtain an OCR recognitionresult, and thereof learn of the street name or the menu name.

In addition, there may be a plurality of picture processing tasks, andthe electronic device 1 performs displaying based on processing resultsof the plurality of processing tasks. For example, as an alternativesolution of FIG. 10 b , the task processing list 902 may be shown inFIG. 14 a . When both an AI enhancement option and an imageclassification option in the task list 902 are selected, the user 1requests to perform AI enhancement and image classification processingon the first picture 401. After performing AI enhancement and imageclassification processing on the first picture 401, an electronic deviceof another user that accepts the task notifies the electronic device 1used by the user 1 of the second picture 701 obtained after processingand a picture classification result “Wedding photos”. In this case, asan alternative solution of FIG. 9 a , as shown in FIG. 15 b , an AIenhancement mark and a wedding photo mark may be displayed on the secondpicture 701 received by the electronic device 1. Referring to FIG. 15 c, the electronic device 1 may classify, in the album, the second picture701 obtained after AI enhancement into a wedding photo category.

Further, referring to FIG. 15 a , the task list 902 may further includea task input box 1501, configured to receive a processing task enteredby the user. For example, the user may enter a processing task “imagefacial expression recognition”.

In some other embodiments of this application, the electronic device 1may also have a capability of processing a to-be-requested task. Theelectronic device 1 may send a processing result to another electronicdevice after performing task processing on the first picture, so thatthe another electronic device, especially an electronic device that doesnot have the task processing capability, shares the processingcapability of the electronic device 1, to obtain the processing result.For example, it is assumed that Lisa and her family members travelabroad, the electronic device of Lisa has an OCR recognition capabilityand a local translation capability, and the electronic device of herfather does not have an OCR recognition capability or a localtranslation capability. In this case, when Lisa and her family memberssee many unknown dish names during ordering, Lisa takes a photo of amenu, obtains a Chinese translation of the menu name in the picturethrough OCR recognition, and sends a processing result to her father andother family members, so that her father and the other family memberscan order dishes based on the Chinese information.

In some other embodiments of this application, after the electronicdevice 1 sends the task request, both the electronic device 1 andanother electronic device having a task processing capability in thegroup can perform task processing.

In some embodiments of this application, when a plurality of electronicdevices accept the task request, the plurality of electronic devices mayfurther combine results. In one case, referring to FIG. 19-1 ,electronic devices that receive a task request sent by anotherelectronic device include the electronic device 1, the electronic device2, and an electronic device 3. The electronic device 1 has a taskprocessing capability, and the electronic device 2 and the electronicdevice 3 do not have a task processing capability. The combinationprocess includes the following steps: 1901. After completing processing,the electronic device 1 sends combination request information to theelectronic device 2 and the electronic device 3. 1902. The electronicdevice 2 requests a synchronization processing result from theelectronic device 1. 1903. The electronic device 3 requests thesynchronization processing result from the electronic device 1. 1904.The electronic device 1 sends the processing result to the electronicdevice 2 and the electronic device 3.

In some embodiments of this application, because models of taskprocessing algorithms may be different, task processing results obtainedafter different electronic devices process a same processing object maybe inconsistent. There are a plurality of methods in which differentelectronic devices determine whether processing objects are a sameobject. For example, electronic devices may determine, based on whetherhash values corresponding to pictures or texts are the same, whetherprocessing objects are a same object. The hash value is a value obtainedthrough calculation based on a hash algorithm. For example, the hashalgorithm may include MD5, SHA-1, and SHA-2 (including SHA-224, SHA-256,SHA-384, and SHA-512). In one case, when processing results areinconsistent, different electronic devices separately share theprocessing results to a group, and each user in the group selects aspecific processing result for retaining or using. In another case, whenprocessing results are inconsistent, different electronic devices eachcombine the processing results and obtain one processing result throughnegotiation, and each electronic device is notified of the oneprocessing result.

An example in which a to-be-processed task is picture classification andan example in which electronic devices (including the electronic device1) that correspond to all users in a group and that have a taskprocessing capability all can perform task processing are used below fordescription.

For example, it is assumed that the group includes Lisa, her mother, andher father, the electronic device 1 used by Lisa and the electronicdevice 2 used by her mother either have an image classification taskprocessing function, and the electronic device 3 used by her father doesnot have an image classification function. In this case, Lisa mayrequest, by using the foregoing method for requesting another electronicdevice to perform an AI enhancement task, another electronic device toperform an image classification task on the first picture 401. Both theelectronic device 1 and the electronic device 2 can perform the imageclassification task, but the electronic device 3 cannot perform theimage classification task. A classification label 1 obtained by theelectronic device 1 through processing is “wedding dress”, and aclassification label 2 obtained by the electronic device 2 throughprocessing is “performance”. In one case, referring to FIG. 16 a , allthe electronic devices display, in the group, various classificationlabels obtained through processing. When a user selects one of theclassification labels, an electronic device of the user displays thefirst picture 401 based on the classification label. For example,referring to FIG. 16 b , when Lisa selects the classification label“wedding dress”, the electronic device 1 classifies the first pictureinto a wedding photo folder.

In another case, the electronic device 1 and the electronic device 2perform combination processing, so as to enable classification labelresults to be consistent through negotiation. In addition, the group mayfurther display a unified processing result obtained throughcombination. When the processing result obtained after combination is“wedding dress”, referring to FIG. 17 a and FIG. 17 b , each electronicdevice may classify the first picture into a wedding photo category.

Specifically, when finding that the processing results obtained by theelectronic devices of the users are inconsistent (for example, whenseeing the screen displayed in FIG. 16 a , the user may instruct theelectronic device to combine the results, so as to actively trigger acombination process. For example, referring to FIG. 18 , when theelectronic device 1 prompts the user 1 whether to combine the processingresults, if the user 1 taps a “yes” option 1801, a processing resultcombination process is actively triggered.

Alternatively, after obtaining the processing result, each electronicdevice may notify another electronic device of the processing result.When an electronic device that first completes task processing findsthat a processing result of the electronic device is inconsistent with aprocessing result of another electronic device, the electronic deviceautomatically initiates a combination process.

Alternatively, the first electronic device that first obtains theprocessing result sends combination request information to anotherelectronic device. After receiving the combination request information,if the another electronic device determines that a local processingresult is inconsistent with the received processing result, the anotherelectronic device accepts the combination request, and therefore acombination process is automatically triggered.

Alternatively, after obtaining a processing result, one electronicdevice may notify another electronic device of the processing result.When a specific electronic device determines that a received processingresult is inconsistent with a processing result obtained by theelectronic device, a combination process is automatically triggered, andtherefore a combination result is directly displayed.

There may be a plurality of combination processing solutions. Thefollowing provides descriptions by using examples.

Solution 1: A classification result obtained by an electronic devicethat first completes an image classification task is a combinationresult.

The electronic device that first completes the image classification taskhas a short processing time and a fast processing speed, and an imageprocessing capability of the electronic device may be stronger.Therefore, a combination result may be subject to a processing result ofthe electronic device.

Solution 2: An electronic device that first completes an imageclassification task performs image classification processing again, andan obtained classification result is a combination result.

Currently, due to a limitation of a processing algorithm model, resultsobtained after one electronic device performs one task for differenttimes may be different. For example, for image recognitionclassification, recognition results obtained after one electronic devicerecognizes one picture for different times may be inconsistentcurrently. For example, recognition results for one picture may be “cat”and “dog”, or face clustering results for one person are different. Inthe embodiments of this application, because the electronic device thatfirst completes the image classification task has a short processingtime and a fast processing speed, an image processing capability of theelectronic device may be stronger, and a result obtained after theelectronic device having a stronger processing capability performsclassification processing again may be more accurate. A combinationresult may be subject to a result obtained after the electronic deviceperforms classification processing again. The result obtained after theelectronic device performs classification processing again may be thesame as or may be different from a previously obtained result.

In the solution 1 and the solution 2, after processing the imageclassification task, each electronic device may notify (for example,through broadcasting) another electronic device, so that each electronicdevice can learn of a moment at which the electronic device completestask processing. In the solution 2, an electronic device that firstcompletes task processing may automatically perform image classificationprocessing again, and an obtained result is a combination processingresult.

For example, when the foregoing solution 2 is used to performcombination processing, for a flowchart of a combination process, referto FIG. 19-2 . The electronic device 1 and the electronic device 2 havea task processing capability, the electronic device 3 does not have atask processing capability, and processing results of the electronicdevice 1 and the electronic device 2 are different. The combinationprocess includes the following steps: 1905: The electronic device 1first completes task processing, and the electronic device 1 sends (forexample, through broadcasting) combination request information toanother electronic device. 1906: The electronic device 2 accepts thecombination request of the electronic device 1. 1907: The electronicdevice 3 requests a synchronization processing result from theelectronic device 1. 1908: The electronic device 1 performs taskprocessing again, and notifies the electronic device 2 and theelectronic device 3 of a processing result.

Solution 3: A classification result obtained through processing by anelectronic device with the latest AI model version is a combinationresult.

An AI model is a device-side AI model of deep learning. For example, AImodel versions with relatively good performance include MobileNet,SqueezeNet, RestNet, and the like, and AI model versions with relativelypoor performance include AlexNet, LeNet5, and the like. The electronicdevice with the latest AI model version has a stronger imageclassification processing capability and a better image classificationeffect. Therefore, the combination result may be subject to theprocessing result of the electronic device.

Solution 4: An electronic device with the latest AI model versionperforms image classification processing again, and an obtainedclassification result is a combination result.

Because the electronic device with the latest AI model version has astronger image classification processing capability and a better imageclassification effect, a result obtained after the electronic deviceperforms classification processing again is more accurate. Therefore,the combination result may be subject to a result obtained after theelectronic device performs processing again.

In the solution 3 and the solution 4, each electronic device may notifyanother electronic device of an AI model version of the electronicdevice, so that each electronic device can learn of a specificelectronic device with the latest AI model version. In the solution 4,the electronic device with the latest AI model version may automaticallyperform image classification processing again, and an obtainedprocessing result is the combination result.

Solution 5: A classification result obtained by an electronic devicehaving a related user label is a combination result.

The related user label is a user label related to task processing. Forexample, when a to-be-processed task is related to a picture, a user wholoves photographing takes many photos, a quantity of times of processinga plurality of pictures may increase, and an image processing capabilitymay be stronger. Therefore, the related user label may be a user wholoves photographing. In addition, if a to-be-processed task is relatedto translation, the related user label may also be a user who lovestranslation.

Solution 6: An electronic device having a related user label performsimage classification processing again, and an obtained classificationresult is a combination result.

A result obtained after the electronic device having the user labelrelated to a to-be-processed task performs processing again is moreaccurate.

In the solution 5 and the solution 6, each electronic device may notifyanother electronic device of a related user label of the electronicdevice, so that each electronic device can learn of a specificelectronic device having the related user label. In the solution 6, theelectronic device having the related user label may automaticallyperform image classification processing again, and an obtainedprocessing result is the combination result.

Solution 7: A classification result obtained after an electronic devicehaving a strongest processing capability performs processing is acombination result, or a classification result obtained after anelectronic device having a strongest processing capability performsprocessing again is a combination result.

In several conditions such as a short processing time, a high AI modelversion, and a related user label, if an electronic device meets moreconditions, the electronic device has a stronger processing capabilityand a more accurate processing result. For example, if both theelectronic device 1 and the electronic device 2 have a favoritephotographing label, but the electronic device 1 spends a shorter timein processing a task, the electronic device 1 has a stronger processingcapability.

Solution 8: Every two of inconsistent results of electronic devices arecombined.

For example, the electronic device 1, the electronic device 2, and theelectronic device 3 sequentially complete image classificationprocessing, and processing results are different. Processing results ofthe electronic device 1 and the electronic device 2 that first completetask processing are combined, and a first result obtained after thecombination is the processing result of the electronic device 1 or theprocessing result of the electronic device 2. The first result obtainedafter the combination and the processing result of the electronic device3 are combined again to obtain a final combination result. The firstcombination process and a next combination process may be specificallyperformed based on the solution 1 to the solution 7.

For example, when the foregoing solution 8 is used to performcombination processing, for a flowchart of a combination process, referto FIG. 19-3 . The electronic device 1, the electronic device 2, and theelectronic device 3 each have a task processing capability, andprocessing results of the electronic device 1, the electronic device 2,and the electronic device 3 are different. The electronic device 1 firstcompletes task processing, and the electronic device 2 second completestask processing. The combination process may include the followingsteps: 1909: The electronic device 1 sends (for example, throughbroadcasting) combination request information to another electronicdevice. 1910: The electronic device 2 that second completes taskprocessing accepts the combination request of the electronic device 1and performs combination with the electronic device 1. 1911: Theelectronic device 1 that first completes task processing performs taskprocessing again to obtain the first combination processing result, andsends the first combination processing result to the electronic device 2and the electronic device 3. 1912: The electronic device 3 finds thatthe first combination result is different from a local processingresult, and the electronic device 3 requests to perform combination withthe combination result of the electronic device 1 again. 1913: Theelectronic device 1 that first completes task processing performs taskprocessing again, and an obtained processing result is a finalcombination processing result. The electronic device 1 sends the finalcombination processing result to the electronic device 2 and theelectronic device 3.

For example, FIG. 19-4 provides another combination processing method.The method includes the following steps: 1914: An electronic device 1and an electronic device 2 may determine whether to-be-processed objectsare a same object. 1915: If the to-be-processed objects are the sameobject, the electronic device 1 and the electronic device 2 determinewhether task processing results are consistent. 1916: If the taskprocessing results are inconsistent, the electronic device 1 and theelectronic device 2 determine an electronic device having a strongprocessing capability based on at least one of a processing time, an AImodel version, and a related user label. 1917: The electronic devicehaving a strong processing capability performs task processing again, toobtain a combination processing result. 1918: The electronic devicehaving a strong processing capability sends the combination processingresult to another electronic device.

In some other embodiments of this application, when the electronicdevice 1 sends a task request to a plurality of other electronicdevices, the plurality of other electronic devices may separatelyprocess some tasks in the task request, and combine task processingresults into a complete task request result and feed back the completetask request result to the electronic device 1.

In some other embodiments of this application, when the electronicdevice 1 sends a plurality of task requests for a same to-be-processedobject to a plurality of other electronic devices, different otherelectronic devices may process different tasks. In one case, a pluralityof task processing results obtained by the plurality of other electronicdevices are fed back to the electronic device 1, and the electronicdevice 1 combines and complements the plurality of task processingresults for the same to-be-processed object. For example, when theelectronic device 1 used by Lisa, the electronic device 2 used by herbrother, and an electronic device 3 used by her mother are connected,after the electronic device 1 used by Lisa sends an AI enhancement taskand an image classification task to the electronic device 2 used by herbrother and the electronic device 3 used by her mother, the electronicdevice 2 processes the AI enhancement task and feeds back the secondpicture 701 obtained after processing to the electronic device 1, andthe electronic device 3 processes the image classification task andfeeds back a processing result “performance” to the electronic device 1.The electronic device 1 combines the second picture 701 obtained byperforming AI enhancement on the first picture 401 with the processingresult “performance” obtained by performing image classification on thefirst picture 401. The electronic device 1 performs displaying based ona combination result. For example, the electronic device 1 may displaythe second picture 701 in a “performance” folder, or the electronicdevice 1 may label the second picture 701 as “performance”.

In another case, a plurality of task processing results obtained by theplurality of other electronic devices are fed back to each connectedelectronic device, and each electronic device combines and complementsthe plurality of received task processing results sent by the pluralityof other electronic devices. For example, when the electronic device 1used by Lisa, the electronic device 2 used by her brother, and anelectronic device 3 used by her mother are connected, after theelectronic device 1 used by Lisa sends an AI enhancement task and animage classification task to the electronic device 2 used by her brotherand the electronic device 3 used by her mother, the electronic device 2processes the AI enhancement task and feeds back the second picture 701obtained after processing to the electronic device 1 used by Lisa andthe electronic device 3 used by her mother, and the electronic device 3processes the image classification task and feeds back a processingresult “performance” to the electronic device 1 used by Lisa and theelectronic device 2 used by her brother. The electronic device 1, theelectronic device 2, and the electronic device 3 each combine the secondpicture 701 obtained by performing AI enhancement on the first picture401 with the processing result “performance” obtained by performingimage classification on the first picture 401, and perform displayingbased on a combination result.

It should be noted that the foregoing APP may support Bluetooth, a WiFihotspot, a WiFi direct network (for example, Huawei Share or SHAREit), amobile data network (for example, 3G, 4G, or 5G), the Internet, or thelike. When a plurality of electronic devices are connected by usingthese communications networks, the connected electronic devices mayimplement the task sharing method shown in FIG. 4 a to FIG. 19-4 byusing an APP.

In some embodiments of this application, when creating a local areanetwork such as Bluetooth, a WiFi hotspot, WiFi direct, or NFC, a usermay enable a task sharing function to establish a task sharing network,so that electronic devices in the task sharing network can share a taskand a task processing capability. For example, referring to FIG. 20 , auser sets a WiFi hotspot 1 and enables a task sharing button 2001. Afterthe user 1 enables an APP, a service screen of the APP includes the WiFihotspot 1.

In some other embodiments of this application, referring to FIG. 21 aand FIG. 21 b , after the user 1 enables an APP 2101, the electronicdevice 1 displays a “select a task sharing network” control 2102 or a“create a task sharing network” control 2103. Referring to FIG. 21C,when the user 1 taps the “select a task sharing network” control 2102,the electronic device 1 displays at least one created task sharingnetwork or one recently created task sharing network. When the user 1selects one task sharing network, electronic devices in the task sharingnetwork may share a task. For example, referring to FIG. 21 d and FIG.21 e , a group named “WiFi hotspot 1” and a member control 2103 aredisplayed on an application screen of the APP 2101. When the user tapsthe member control 2103, the electronic device 1 displays a list 2104 ofidentifiers of devices accessing the WiFi hotspot 1. For example, thedevice identifier may be a device serial number, or a name labeled bythe user in FIG. 21 e . When an electronic device accessing the WiFihotspot 1 changes in real time, a device in the device identifier list2104 also changes in real time. The electronic device accessing the WiFihotspot 1 may share a task by using the method shown in FIG. 4 a to FIG.19-4 .

When the user 1 taps the “create a task sharing network” control 2103,the electronic device 1 displays a network creation screen, the user 1may create a task sharing network, and electronic devices in the tasksharing network may share a task. For example, referring to FIG. 22 a toFIG. 22 c , when the user 1 taps the “create a task sharing network”control 2103 and selects a WiFi hotspot type, a WiFi hotspot networkcreation screen is displayed, and the user creates a WiFi hotspot tasksharing network and enables a task sharing function. After the tasksharing network is created, the electronic device 1 may display a screenshown in FIG. 21 d . The electronic device accessing the WiFi hotspot 1may share a task by using the method shown in FIG. 4 a to FIG. 19-4 .

In some other embodiments of this application, after a task sharingnetwork is established, the user 1 may further set one or more tasks onan APP screen, and electronic devices in the task sharing network mayshare a capability of performing one or more tasks. For example, if atask sharing network accessed by the electronic device 1 is the WiFihotspot 1, referring to FIG. 23 a and FIG. 23 b , when the user taps asetting button, a task list 2301 may be displayed. When the user selectsan “AI enhancement after photographing” option in the task list 2301,after the user takes a photo, electronic devices accessing the WiFihotspot 1 automatically share an AI enhancement task. That electronicdevices accessing the WiFi hotspot 1 automatically share an AIenhancement task includes: The electronic devices accessing the WiFihotspot 1 each perform AI enhancement task processing and automaticallycombine processing results. In addition, a combination result may benotified to the electronic device 1 and another electronic deviceaccessing the WiFi hotspot 1. For a combination process, refer to thedescriptions of the foregoing related parts. Details are not describedherein again.

An example in which a to-be-processed task is an AI enhancement task isstill used below to describe a network sharing manner.

In some other embodiments of this application, when establishing a tasksharing network, the electronic device may set one or more specificsharing tasks. For example, as shown in FIG. 24 a , when the user 1establishes the WiFi hotspot 1 and taps a task sharing button 2401, theelectronic device 1 may display a task sharing list 2402 to the user.When the user 1 selects or enters one or more tasks in the sharing list2402, electronic devices accessing the task sharing network may sharethe one or more tasks and task processing capabilities.

For example, when the user 1 selects an “AI enhancement afterphotographing” task in the sharing list 2402, referring to FIG. 24 b ,after the user 1 obtains the first picture 401 through photographing, ifthe electronic device 1 has accessed a task sharing network, electronicdevices accessing the network automatically share an AI enhancementtask, and the electronic device 1 obtains the second picture 402 afterAI enhancement. Alternatively, a task sharing button may be displayed ona photographing screen. When the user selects the task sharing button,after the user obtains the first picture 401 through photographing, ifthe electronic device 1 has accessed a task sharing network, electronicdevices accessing the task sharing network automatically shares an AIenhancement task, and the electronic device 1 obtains the second picture402 after AI enhancement. If the electronic device 1 does not access thetask sharing network, the electronic device 1 may prompt the user tocreate or access a task sharing network. In a specific implementation,the electronic device 1 may first access the task sharing network beforetaking a photo, to share an AI enhancement task with an electronicdevice in the task sharing network after the electronic device 1 takes aphoto.

That electronic devices accessing the task sharing network automaticallyshare an AI enhancement task includes: The electronic devices accessingthe task sharing network each process the AI enhancement task andautomatically combine processing results. In addition, a combinationresult may be notified to the electronic device 1 and another electronicdevice in the task sharing network. For a combination process, refer tothe descriptions of the foregoing related parts. Details are notdescribed herein again.

In some other embodiments of this application, after selecting a pictureon the photographing screen or from the album, the user 1 mayalternatively select at least one task for processing. If the electronicdevice 1 has accessed the task sharing network, an electronic device inthe task sharing network automatically shares a task, and obtains aprocessing result. For example, referring to FIG. 25 a to FIG. 25 d ,after the user 1 touches and holds the first picture 401 in the albumand selects an AI enhancement task, if the electronic device 1 hasaccessed the task sharing network, the electronic device 1 automaticallyobtains the second picture 701 that is obtained after AI enhancement. Ifthe electronic device 1 does not access the task sharing network, theelectronic device 1 may prompt the user to create or access a tasksharing network.

Some other embodiments of this application further provide a tasksharing method. In the method, n (a positive integer) electronic devicesestablish a short-distance connection, each connected electronic devicemay display a global picture, and the global picture includes allpictures on the n electronic devices.

In one case, in the n electronic devices, the user may select onepicture (or one group of pictures) from a specific electronic device,and request another electronic device to process, by sharing a task, thepicture selected by the user, and obtain a processing result. The taskis a preset or default task. For example, the task may be AIenhancement.

For example, referring to FIG. 26 a , Lisa enables an AI enhancementswitch 2601 displayed on a settings screen of the electronic device 1,or referring to FIG. 26 b , Lisa enables a task sharing switch 2602 andan AI enhancement switch 2601 that are displayed on a setting interfaceof the electronic device 1. In response to an operation of enabling theAI enhancement switch 2601, the electronic device 1 initiates ashort-distance network connection (for example, a WiFi hotspot network,a WiFi direct network, a Bluetooth network, or a ZigBee network), theelectronic device 2 used by her mother and the electronic device 3 usedby her father access the WiFi direct network. In this case, a globalpicture is displayed on each of the electronic device 1, the electronicdevice 2, and the electronic device 3, and the global picture includesall original pictures that are in the three electronic devices beforethe three electronic devices access the network. In some embodiments, asource label is displayed on the global picture, and is used to identifya specific electronic device from which the picture is. For example, thesource label is an electronic device model. For example, as shown inFIG. 26 c , in the global picture, a source label 2603 displayed on apicture from the electronic device 1 may be Huawei Enjoy 5, a sourcelabel displayed on a picture from the electronic device 2 may be HuaweiMate 10 pro, and a source label displayed on a picture from theelectronic device 3 may be Huawei P10.

For example, in some embodiments of this application, when Lisa selectsone picture such as the picture 401 from the global picture, theelectronic device 1 may perform, by using the task sharing method in theforegoing embodiments, AI enhancement on the picture 401 by lending acapability of another electronic device, and obtain a processing result.For example, the electronic device 1 sends a picture identifier of thepicture 401 to the electronic device 2 and the electronic device 3, andthe electronic device 2 performs AI enhancement on the picture 401 andsends a processing result to the electronic device 1 and the electronicdevice 3.

In some other embodiments of this application, a thumbnail of a pictureis displayed in the global picture. When Lisa selects the picture 401from the global picture, the electronic device 1 sends specific datainformation of the picture 401 to the electronic device 2 and theelectronic device 3. The electronic device 2 and the electronic device 3each perform AI enhancement on the picture 401, combine task processingresults, and then send the task processing results to the electronicdevice 1.

After receiving the task processing results, the electronic device 1 maydisplay, in a manner shown in FIG. 11-1 a to FIG. 11-1 d or FIG. 11-2 ato FIG. 11-2 f, a picture obtained after AI enhancement. For example, asshown in FIG. 26 d , in the global picture displayed by the electronicdevice 1, a first mark (AI enhancement) is displayed on the picture 701obtained after AI enhancement, to indicate that the current picture is apicture obtained after AI enhancement.

In another case, a specific electronic device in the n electronicdevices may perform task processing on the picture selected by the user,and send a processing result to at least one another electronic device.

For example, in some embodiments of this application, when her motherselects the picture 401 from the global picture, the electronic device 2performs AI enhancement on the picture 401, and sends a processingresult to the electronic device 2 and the electronic device 3.

In some other embodiments of this application, a picture in the globalpicture is a thumbnail. When her mother selects the picture 401 from theglobal picture displayed on the electronic device 2, the electronicdevice 2 obtains specific data information of the picture 401 from theelectronic device 1. After obtaining the specific data information ofthe picture 401, the electronic device 2 performs AI enhancement on thepicture 401, and sends a picture obtained after AI enhancement to theelectronic device 1 and the electronic device 3. The electronic device 1may display, in a manner shown in FIG. 11-1 a to FIG. 11-1 d or FIG.11-2 a to FIG. 11-2 f, the picture obtained after AI enhancement.

When the short-distance network connection is disconnected, or when theuser disables the AI enhancement switch 2601 in FIG. 26 a , or when theuser disables the task sharing switch 2602 in FIG. 26 b , the globalpicture is not displayed in each electronic device, only a picture(including a picture obtained after AI task sharing processing) in thecurrent electronic device is displayed.

An example in which a to-be-processed object is an obtained picture isused above for description. The to-be-processed object may also be agroup of obtained pictures, a text, a video, a folder, or the like. Thefolder may include a picture, a text, or a video. When theto-be-processed object is a folder, the to-be-processed object isactually a picture, a text, and a video in the folder. When theto-be-processed object is a video, a processing task may be imagestabilization processing, smoothness processing, clarity processing, orthe like. When the to-be-processed object is a text, a processing taskmay include text translation, text intent recognition, entityextraction, or the like. Similar to the method for sharing a task when ato-be-processed object is an obtained picture, when the to-be-processedobject is a task of processing a group of obtained pictures, a textvideo, or a folder, task sharing may be performed in the foregoing APPsharing manner or network sharing manner.

For example, when the to-be-processed object is a shot video, aprocessing task may be image stabilization processing. For example, ifthe video is shot by the user while the user is walking or in a vehicle,the electronic device shakes during shooting, and consequently ato-be-photographed video image is blurred and shaken. In this case, theelectronic device 1 may request another electronic device to share avideo stabilization processing task, to perform image stabilizationprocessing on the video through the another electronic device, and thenobtain an image obtained after processing. This alleviates video imageflickering, and makes a taken picture clearer and sharper.

When the to-be-processed object (for example, the to-be-processed objectis a video) has a relatively large amount of data, or when a task isrelatively urgent and needs to be processed in time, a faster and moreefficient communication manner such as WiFi direct or a WiFi hotspot maybe used between a plurality of electronic devices. When theto-be-processed object has a relatively small amount of data, or when ato-be-processed task is not urgent, a relatively slow communicationmanner such as Bluetooth, NFC, or a mobile network may be used between aplurality of electronic devices. When the to-be-processed object isprivacy information, a trusted local area network may be establishedbetween a plurality of electronic devices by using Bluetooth, a WiFihotspot, WiFi direct, NFC, or the like, to perform task sharing. In thisway, the to-be-processed object does not pass through an intermediatedevice such as a cloud server or a repeater. Therefore, confidentialityand security are relatively high.

It should be noted that, when the to-be-processed object is a group ofobtained pictures, an obtained text, an obtained video, or an obtainedfolder, and when a plurality of electronic devices share a task, ifprocessing results are different, the plurality of electronic devicesmay further combine the processing results. Herein, details about acombination processing process are not described again.

In some other embodiments of this application, the electronic device mayperform task processing on the to-be-processed object, and share a taskprocessing result with another electronic device. For example, Lisa andEmmy participate in a seminar together, and related information of theseminar is a foreign-language text. The electronic device 1 used by Lisaand the electronic device 2 used by Emmy are connected based on acommunications network. Lisa translates, by using a local processingcapability of the electronic device 1 or a cloud server, theforeign-language text into a Chinese-language text and sends atranslation result to the electronic device 2 used by Emmy, and Emmy maydirectly read the translated Chinese content without furthertranslation. This can further save traffic consumed by Emmy fortranslation by using the cloud server.

Application scenario 2: A to-be-processed task is a real-time andcontinuous task. For example, the application scenario 2 is a videostabilization scenario, a video chat optimization scenario, and areal-time preview optimization scenario.

During video shooting, because the user takes a photo in walking or in avehicle, the electronic device shakes, and consequently a taken videoimage shakes. The video stabilization means that, in a photographingprocess, processing is performed by a current electronic device oranother electronic device to reduce video stabilization in thephotographing process, so that a taken picture is clearer and sharper.

The video chat optimization means that, during video chatting,processing is performed by a current electronic device or anotherelectronic device to improve chat picture smoothness and optimize animage display effect. For example, the electronic device may performvoice segmentation on a video image, and separately perform optimizationprocessing (for example, perform AI enhancement on a person) ondifferent entities such as a recognized person, plant, or blue sky.

The real-time preview optimization means that, in a camera previewscreen, the electronic device 1 sends a previewed picture to anotherelectronic device in real time, and the another electronic deviceperforms image optimization processing (for example, AI enhancement orfilter processing), and then sends a picture obtained after processingto the electronic device 1 in real time. The electronic device 1displays, in the preview screen, an image obtained after optimizationprocessing. When the user 1 sees a satisfactory picture effect on theelectronic device 1, the user 1 may tap to take a photo, to store asatisfactory photo for the user 1.

In some embodiments of this application, when a user sets a local areanetwork by using Bluetooth, a WiFi hotspot, a WiFi direct network, orthe like, the user may enable a task sharing button to establish a tasksharing network, so that electronic devices in the task sharing networkcan share a task and a task processing capability. The task processingcapability includes a real-time preview processing capability, a videochat optimization capability, and a video stabilization processingcapability. In the application scenario 2, an electronic device thatrequests task processing may not process a corresponding task (arequested task).

For example, in FIG. 23 b , the task list 2301 may further include a“video stabilization” option, a “video chat optimization” option, a“real-time preview optimization” option, and the like. When the user 1selects the “video stabilization” option in the task list 2301, and whenthe user 1 shoots a video, the electronic device 1 automatically sendseach collected picture to another electronic device accessing the WiFihotspot 1, and the another electronic device returns each pictureobtained after image stabilization processing to the electronic device1. The electronic device 1 generates a video based on a plurality ofimages obtained after image stabilization processing. In a photographingprocess, the electronic device 1 displays an image obtained after imagestabilization processing. For example, if the electronic device of Lisahas a relatively poor image processing capability and the electronicdevice of her brother has a relatively strong video processingcapability, when shooting a video on a train, Lisa may perform videostabilization processing by using the electronic device of her brother.In this way, Lisa can shoot a relatively stable video on the train.

For another example, when the user 1 selects the “video chatoptimization” option in the task list 2301, when the user performs videochatting, the electronic device 1 automatically sends each collectedpicture to another electronic device accessing the WiFi hotspot 1, theanother electronic device returns an optimized picture to the electronicdevice 1, and the electronic device 1 displays the optimized picture inreal time when the user 1 performs video chatting. In this way, the usercan see a picture with a better effect during video chatting. Thisimproves video chat user experience. For example, if the electronicdevice of Lisa has a relatively poor video processing capability and theelectronic device of her brother has a relatively strong videoprocessing capability, when Lisa performs video chatting, Lisa mayperform optimization processing by using the electronic device of herbrother. In this way, Lisa can see a smoother and clearer picture duringvideo chatting.

For another example, when the user 1 selects the “real-time preview”option in the task list 2301, on a preview screen of Camera, theelectronic device 1 automatically sends each collected picture toanother electronic device accessing the WiFi hotspot 1, and the anotherelectronic device returns an optimized picture to the electronic device1. A picture displayed when the electronic device 1 performs preview isan optimized picture.

In some other embodiments of this application, the user 1 may set atleast one task for processing on a video shooting screen, a chat screen,or a camera preview interface. If the electronic device 1 has accessedthe task sharing network, the electronic device in the task sharingnetwork automatically performs task processing such as videostabilization, video chat optimization, or real-time previewoptimization, and the electronic device 1 and another electronic devicein the task sharing network may obtain a processing result. For example,on a screen displayed after the user 1 answers a video chat, orreferring to FIG. 27 a to FIG. 27 c , on a screen displayed before theuser 1 answers a video chat, after the user taps a setting button 2701and selects a “video chat optimization” option, if the electronic device1 has accessed the task sharing network, the electronic device 1displays an optimized picture 2702. In addition, the electronic device 1may further display prompt information, to prompt the user 1 that acurrent picture is a result obtained after processing by anotherelectronic device. For example, referring to FIG. 27 c , the promptinformation 2703 may be specifically “an image has been processed byusing another device”. If the electronic device 1 does not access thetask sharing network, the electronic device 1 may prompt the user tocreate or access a task sharing network. In a specific implementation,the electronic device 1 may first access the task sharing network beforeperforming video chatting. Therefore, during video chatting, theelectronic device 1 can optimize a video image by using an electronicdevice in the task sharing network.

In some other embodiments of this application, a sharing list 2002 inFIG. 20 may further include a “video stabilization” option, a “videochat optimization” option, and a “real-time preview optimization”option. When the user 1 selects or enters one or more tasks in thesharing list 2002, an electronic device accessing the task sharingnetwork may share the one or more tasks. For example, when the user 1selects the “video stabilization” option, when the user 1 shoots avideo, if the electronic device 1 has accessed the task sharing network,an electronic device accessing the task sharing network automaticallyperforms video stabilization processing, and the electronic device 1obtains a video obtained after image stabilization processing.Alternatively, a task sharing button may be displayed on a photographingscreen. When the user selects the task sharing button, and when the user1 shoots a video, if the electronic device 1 has accessed the tasksharing network, an electronic device accessing the task sharing networkautomatically performs video stabilization processing, and theelectronic device 1 obtains a video obtained after stabilizationprocessing.

In one case, when a plurality of electronic devices process a taskrequest in the scenario 2, if processing results are different, theplurality of electronic devices may further automatically combine theprocessing results. For a combination processing process, refer to thedescriptions of the foregoing related parts. Details are not describedherein again.

In another case, in the application scenario 2, there is one electronicdevice that accepts the task request. In this way, a plurality ofprocessing results do not need to be combined. This can save aprocessing time, and ensure that an electronic device that requests atask can display a picture in real time.

It should be further noted that a relatively strong data transmissioncapability and a relatively fast transmission speed are required in acase shown in the application scenario 2. Therefore, an efficienttransmission manner such as a WiFi hotspot or WiFi direct may be used.

Some other embodiments of this application provide an image processingmethod. As shown in FIG. 28 , the method may include the followingsteps: 2801: A first electronic device displays a first screen, wherethe first screen is a camera screen of the first electronic device. Forexample, the first screen may be the screen shown in FIG. 3 b . 2802:The first electronic device detects a first operation of a user on thefirst screen. In the embodiments of this application, an operation (forexample, the first operation, a second operation, a fourth operation, ora third operation) includes a voice operation or a gesture operation.The gesture operation may include a touch gesture or a floating gesture.The touch gesture may include but is not limited to a tap gesture, adouble-tap gesture, a touch-and-hold gesture, a press gesture, a draggesture, or the like. 2803: The first electronic device obtains a firstimage file through photographing in response to the first operation,where the image file includes a picture or a video. For example, asshown in FIG. 4 a , the first electronic device obtains the firstpicture 401 (that is, the first image file) through photographing whendetecting that the user taps a photographing button. 2804: The firstelectronic device detects the second operation of the user on the firstscreen. 2805: The first electronic device displays a second image filein response to the second operation, where the second image file isassociated with a result obtained after a second electronic deviceprocesses the first image file. For example, the second operation may bean operation of tapping the thumbnail 1101 shown in FIG. 11-2 a, and thesecond image file may be the second picture 701 in FIG. 11-2 a to FIG.11-2 f.

In the embodiments of this application, the first electronic devicehaving a relatively weak local processing capability may process thefirst image file by lending a capability of the second electronicdevice, so that the first electronic device locally displays aprocessing result, thereby improving user experience of the firstelectronic device having a relatively weak local processing capability.

In some other embodiments of this application, after the firstelectronic device obtains the first image file through photographing,the method further includes the following steps: 2806: The firstelectronic device automatically sends the first image file to the secondelectronic device. 2807: The first electronic device automaticallyreceives processing data sent by the second electronic device, where theprocessing data is obtained by the second electronic device byprocessing the first image file, and the processing data is associatedwith the second image file. For example, after the user obtains thefirst picture 401 (that is, the first image file) through photographing,the first electronic device automatically receives, without needing anoperation of the user, AI enhancement processing data sent by the secondelectronic device. In addition, as shown in FIG. 11-2 a to FIG. 11-2 f,the first electronic device displays the second picture 701 based on theAI enhancement processing data.

In some other embodiments of this application, before the firstelectronic device obtains the first image file through photographing,the method further includes the following steps: 2808: The firstelectronic device receives a processing type that is set by the user.2809: The first electronic device sends the processing type to thesecond electronic device. In this case, the second electronic devicelearns of an operation requested by the first electronic device, toprocess the first image file based on the requested operation. Forexample, as shown in FIG. 26 a or FIG. 26 b , the user may preset theprocessing type “AI enhancement after picture photographing”, and thefirst electronic device sends the processing type to the secondelectronic device over a communications network. For another example, asshown in FIG. 23 b or FIG. 24 a , the user may preset the processingtype “AI enhancement after picture photographing”, and the firstelectronic device sends the processing type to the second electronicdevice over an APP or a communications network. In this case, afterobtaining the first picture 401 through photographing, the secondelectronic device automatically performs AI enhancement on the firstpicture 401 through the second electronic device.

In the embodiments of this application, the processing type requested bythe first electronic device includes at least one of imagebeautification, image classification, image facial recognition, imageclustering, image facial expression recognition, image age analysis,image optical character recognition OCR, image semantic segmentation, orthe like.

In the embodiments of this application, the processing data includes atleast one of the second image file or associated data. For example, whenthe processing type is “AI enhancement” and the first image file is thefirst picture 401, the processing data is the second image file, and thesecond image file is the second picture 701. For example, when theprocessing type is “image classification” and the first image file isthe first picture 401, the processing data is the associated data, andthe associated data is a classification result: a label “wedding photo”.For example, when the processing type is “image facial recognition” andthe first image file is a family group photo taken by Lisa, theprocessing data is the associated data, and the associated data isfacial recognition results: “father, mother, Lisa, and brother” (Forexample, the second electronic device may arrange the facial recognitionresults in a preset format, for example, in a sequence of faces includedin the picture from left to right). For example, when the processingtype is “AI enhancement” and “image classification”, the processing datamay be the second image file and the associated data, the second imagefile is the second picture 701 obtained after processing, and theassociated data is a classification result “wedding photo”.

When the associated data includes a label, the label may correspond toone folder, and the second image file is in the folder corresponding tothe label. For example, as shown in FIG. 15 c , when the imageclassification result is “wedding photo”, the associated data includes alabel “wedding photo”, and the second picture 701 is in a foldercorresponding to the label “wedding photo”.

In some other embodiments of this application, before step 2801, themethod may further include the following step: 2810: The firstelectronic device establishes a short-distance connection to the secondelectronic device. For example, the first electronic device mayestablish the short-distance connection to the second electronic deviceover a WiFi hotspot, WiFi direct, Bluetooth, ZigBee, or NFC. Forexample, as shown in FIG. 20 , FIG. 22 c , or FIG. 24 a , the firstelectronic device may establish a WiFi hotspot, and the secondelectronic device may access the WiFi hotspot, so that theshort-distance connection is established between the first electronicdevice and the second electronic device.

In some other embodiments of this application, there are a plurality ofsecond electronic devices. For example, as shown in FIG. 12 a and FIG.12 b or as shown in FIG. 14 c , the first electronic device may send thefirst picture 401 to a plurality of electronic devices used by familymembers or friends for processing. When there are a plurality of secondelectronic devices, the processing data is data obtained by combining aplurality of pieces of processing data of the plurality of secondelectronic devices. For example, for an example in which a plurality ofsecond electronic devices combine a plurality of pieces of processingdata, refer to FIG. 17 a , FIG. 18 , or FIG. 19-1 to FIG. 19-4 .

In some other embodiments of this application, there may be a pluralityof processing types that the first electronic device requests the secondelectronic device to process. For example, as shown in FIG. 15 a , theprocessing type requested by the first electronic device for processingincludes AI enhancement and image classification. In this case,processing data obtained by each second electronic device corresponds toat least one of the plurality of processing types. For example, thesecond electronic devices include an electronic device 2 and anelectronic device 3, the electronic device 2 may perform AI enhancementprocessing, and the electronic device 3 may perform image classificationprocessing.

Some other embodiments of this application provide another imageprocessing method. As shown in FIG. 29 , the method includes thefollowing steps: 2901: A second electronic device establishes ashort-distance connection to a first electronic device. For example, thefirst electronic device may establish the short-distance connection tothe second electronic device over a communications network such as aWiFi hotspot, WiFi direct, Bluetooth, ZigBee, or NFC. For example, asshown in FIG. 20 , FIG. 22 c , or FIG. 24 a , the first electronicdevice may establish a WiFi hotspot, and the second electronic devicemay access the WiFi hotspot, so that the short-distance connection isestablished between the first electronic device and the secondelectronic device. 2902: The second electronic device receives a firstimage file sent by the first electronic device. 2903: The secondelectronic device displays prompt information, where the promptinformation is used to prompt a user that the first electronic devicerequests image processing. For another example, the prompt informationmay be the prompt information 1001 shown in FIG. 10 b , and is used toprompt the user whether to accept image processing. 2904: When detectingthat the user accepts a third operation of image processing that isrequested by the first electronic device, the second electronic deviceprocesses the first image file in response to the third operation, toobtain processing data, and sends the processing data to the firstelectronic device, where the processing data is associated with a secondimage file. For example, the third operation may be an operation thatthe user taps the “Accept” button in FIG. 10 b . In response to the tapoperation, the second electronic device may process the first picture401 to obtain AI enhancement processing data, and send the AIenhancement processing data to the first electronic device.

In the embodiments of this application, the second electronic devicehaving a relatively strong local processing capability may lend acapability of processing the first image file to the first electronicdevice, so that the first electronic device can locally display aprocessing result of the second electronic device, thereby improvinguser experience of the first electronic device having a relatively weaklocal processing capability.

Optionally, before the second electronic device receives the first imagefile sent by the first electronic device, the method further includesthe following step: 2905: The second electronic device obtains aprocessing type. In this case, the second electronic device may processthe first image file based on the obtained processing type.Specifically, the second electronic device may obtain the processingtype from the first electronic device. For example, in FIG. 9 b , afterLisa sets the processing type “AI enhancement”, the first electronicdevice used by Lisa may send the processing type “AI enhancement” to thesecond electronic device, and the second electronic device processes thefirst picture 401 based on the processing type “AI enhancement” sent bythe first electronic device. Alternatively, the second electronic devicemay obtain the processing type that is set by the user. For example,when the second electronic device is connected to the first electronicdevice in a manner shown in FIG. 20 , FIG. 22 c , or the like, and theprocessing type “AI enhancement” is set, the second electronic devicemay obtain the processing type that is set by the user.

Optionally, the third operation in step 2904 is an operation that theuser sets the processing type for the first image file. For example,when the user taps the “AI enhancement” button shown in FIG. 6 c or FIG.6 d , the second electronic device processes the first image file inresponse to the tap operation, to obtain the processing data, and sendsthe processing data to the first electronic device.

In some other embodiments of this application, the method furtherincludes the following step: 2906: The second electronic device displaysthe second image file based on the processing data. For example, afterthe second electronic device used by Emmy sends the second picture 701obtained after AI enhancement to the first electronic device used byLisa, as shown in FIG. 11-1 b or FIG. 11-1 c, the second electronicdevice may also display the second picture 701 obtained after AIenhancement in the album.

In some other embodiments of this application, after the secondelectronic device obtains the processing data, the method furtherincludes: The second electronic device negotiates with anotherelectronic device about the processing data for the first image file.When there are a plurality of electronic devices that accept theprocessing request of the first electronic device, for example, as shownin FIG. 17 a , FIG. 18 , or FIG. 19-1 to FIG. 19-4 , the secondelectronic device may further combine processing data with anotherelectronic device, to obtain consistent processing data. Alternatively,when there are a plurality of processing types requested by the firstelectronic device for a same to-be-processed object request, differentelectronic devices that accept the processing request may process theto-be-processed object based on different processing types, and thesecond electronic device may send locally obtained processing data toanother electronic device, or may receive processing data thatcorresponds to another processing type and that is sent by anotherelectronic device, and integrate different pieces of processing datarespectively corresponding to different processing types.

Some other embodiments of this application provide another imageprocessing method. The method includes: A second electronic deviceestablishes a short-distance connection to a first electronic device.The second electronic device receives a first image file sent by thefirst electronic device. The second electronic device displays promptinformation, processes the first image file to obtain processing data,and sends the processing data to the first electronic device, where theprocessing data is associated with a second image file. For example, theprompt information may be the prompt information 3001 shown in FIG. 30 ,and is used to prompt a user with “helping another electronic device toperform task processing”, so that the user using the second electronicdevice learns that the second electronic device is not freezing becauseof a fault or the like. In addition, a display screen of the promptinformation 3001 may further include a “stop processing” button 3002that is used to enable the second electronic device to stop processing atask requested by another electronic device, according to an instructionof the user.

It can be understood that, to implement the foregoing functions, theelectronic device includes a corresponding hardware structure and/orsoftware module for performing each function. A person of ordinary skillin the art should easily be aware that, in combination with the examplesdescribed in the embodiments disclosed in this specification, algorithmsteps may be implemented by hardware or a combination of hardware andcomputer software. Whether a function is performed by hardware orhardware driven by computer software depends on particular applicationsand design constraints of the technical solutions. A person skilled inthe art may use different methods to implement the described functionsfor each particular application, but it should not be considered thatthe implementation goes beyond the scope of this application.

In the embodiments of this application, the electronic device or theserver may be divided into function modules based on the foregoingmethod examples. For example, each function module may be obtainedthrough division based on each corresponding function, or two or morefunctions may be integrated into one processing module. The integratedmodule may be implemented in a form of hardware, or may be implementedin a form of a software function module. It should be noted that, in theembodiments of this application, module division is an example, and ismerely a logical function division. During actual implementation,another division manner may be used.

When each function module is obtained through division based on eachcorresponding function, FIG. 31 is a possible schematic compositiondiagram of the first electronic device in the foregoing embodiments. Asshown in FIG. 31 , the first electronic device 3100 may include adisplay unit 3101, a detection unit 3102, a photographing unit 3103, asending unit 3104, a receiving unit 3105, and a connection unit 3106.

The display unit 3101 may be configured to support the first electronicdevice 3100 in performing step 2801 and step 2805 in the imageprocessing method shown in FIG. 28 . The detection unit 3102 may beconfigured to support the first electronic device 3100 in performingstep 2802 and step 2804 in the image processing method shown in FIG. 28. The photographing unit 3103 may be configured to support the firstelectronic device 3100 in performing step 2803 in the image processingmethod shown in FIG. 28 . The sending unit 3104 may be configured tosupport the first electronic device 3100 in performing step 2806 in theimage processing method shown in FIG. 28 . The receiving unit 3105 maybe configured to support the first electronic device 3100 in performingstep 2807 and step 2808 in the image processing method shown in FIG. 28. The connection unit 3106 may be configured to support the firstelectronic device 3100 in performing step 2810 in the image processingmethod shown in FIG. 28 .

It should be noted that all related content of the steps in theforegoing method embodiments may be cited in function descriptions ofcorresponding function modules. Details are not described herein again.

The first electronic device provided in this embodiment of thisapplication is configured to perform the foregoing image processingmethod, and therefore can achieve a same effect as the image processingmethods described in FIG. 4 a to FIG. 30 .

When an integrated unit is used, the detection unit 3102, thephotographing unit 3103, and the connection unit 3106 may be integratedinto a processing module, the display unit 3101 may be integrated into adisplay module, and the sending unit 3104 and the receiving unit 3103may be integrated into a communications module.

The processing module is configured to control and manage an action ofthe first electronic device. For example, the processing module isconfigured to support the first electronic device in performing step2810, step 2802, step 2803, and step 2804 in FIG. 28 , and/or isconfigured to perform another process of the technology described inthis specification. The display module may be configured to support thefirst electronic device in performing step 2801 and step 2805 in FIG. 28, and may further display a graphical user interface, image or parameterinformation, or the like to a user. The communications module may beconfigured to support the first electronic device in performing step2806, step 2807, step 2808, and step 2809 in FIG. 28 .

The processing module may be a processor or a controller, for example, acentral processing unit (central processing unit, CPU), a graphicsprocessing unit (graphics processing unit, GPU), a general purposeprocessor, a digital signal processor (digital signal processor, DSP),an application-specific integrated circuit (application-specificintegrated circuit, ASIC), a field programmable gate array (fieldprogrammable gate array, FPGA) or another programmable logic device, atransistor logic device, a hardware component, or any combinationthereof. The processor may implement or execute various example logicalblocks, modules, and circuits described with reference to contentdisclosed in this application. Alternatively, the processor may be acombination of processors implementing a computing function, forexample, a combination of one or more microprocessors, or a combinationof the DSP and a microprocessor.

The display module may be a display, and may be a device configured todisplay information entered by the user, information provided for theuser, and various menus of a terminal. Specifically, the display may beconfigured in a form of a liquid crystal display, an organiclight-emitting diode, or the like. In addition, a touchpad may befurther integrated into the display, and is configured to collect atouch event on or near the touchpad and send collected touch informationto another component (for example, a processor).

The communications module may be configured to support the firstelectronic device in communicating with another network entity, forexample, communicating with a server. The communications module may bespecifically a device that interacts with another first electronicdevice, such as a radio frequency circuit, a Bluetooth chip, or a WiFichip.

In addition, the first electronic device 3100 may further include astorage module, configured to store a processing type entered by theuser, a photographed picture, program code of the first electronicdevice, and the like. The storage module may be a memory. The memory mayinclude a high-speed RAM, or may include a nonvolatile memory, forexample, a magnetic disk storage device, a flash memory, or anothervolatile solid-state storage device.

When each function module is obtained through division based on eachcorresponding function, FIG. 32 is a possible schematic compositiondiagram of the second electronic device in the foregoing embodiments. Asshown in FIG. 32 , the second electronic device 3200 may include aconnection unit 3201, a receiving unit 3202, a display unit 3203, aprocessing unit 3204, a sending unit 3205, and an obtaining unit 3206.

The connection unit 3201 may be configured to support the secondelectronic device 3200 in performing step 2901 in the image processingmethod shown in FIG. 29 . The receiving unit 3202 may be configured tosupport the second electronic device 3200 in performing step 2902 in theimage processing method shown in FIG. 29 . The display unit 3203 may beconfigured to support the second electronic device 3200 in performingstep 2903 and step 2904 in the image processing method shown in FIG. 29. The processing unit 3204 may be configured to support the secondelectronic device 3200 in performing step 2904 in the image processingmethod shown in FIG. 29 . The sending unit 3205 may be configured tosupport the second electronic device 3200 in performing step 2906 in theimage processing method shown in FIG. 29 . The obtaining unit 3206 maybe configured to support the second electronic device 3200 in performingstep 2905 in the image processing method shown in FIG. 29 .

It should be noted that all related content of the steps in theforegoing method embodiments may be cited in function descriptions ofcorresponding function modules. Details are not described herein again.

The second electronic device provided in this embodiment of thisapplication is configured to perform the foregoing image processingmethod, and therefore can achieve a same effect as the image processingmethods described in FIG. 4 a to FIG. 30 .

When an integrated unit is used, the connection unit 3201, theprocessing unit 3204, and the obtaining unit 3206 may be integrated intoa processing module, the display unit 3203 may be integrated into adisplay module, and the sending unit 3205 and the receiving unit 3202may be integrated into a communications module.

The processing module is configured to control and manage an action ofthe second electronic device. For example, the processing module isconfigured to support the second electronic device in performing step2901, step 2905, and step 2904 in FIG. 29 , and/or is configured toperform another process of the technology described in thisspecification. The display module may be configured to support thesecond electronic device in performing step 2903 and step 2906 in FIG.29 , and may further display a graphical user interface, image orparameter information, or the like to a user. The communications modulemay be configured to support the second electronic device in performingstep 2902 and step 2904 in FIG. 29 .

The processing module may be a processor or a controller, for example, acentral processing unit (central processing unit, CPU), a graphicsprocessing unit (graphics processing unit, GPU), a general purposeprocessor, a digital signal processor (digital signal processor, DSP),an application-specific integrated circuit (application-specificintegrated circuit, ASIC), a field programmable gate array (fieldprogrammable gate array, FPGA) or another programmable logic device, atransistor logic device, a hardware component, or any combinationthereof. The processor may implement or execute various example logicalblocks, modules, and circuits described with reference to contentdisclosed in this application. Alternatively, the processor may be acombination of processors implementing a computing function, forexample, a combination of one or more microprocessors, or a combinationof the DSP and a microprocessor.

The display module may be a display, and may be a device configured todisplay information entered by the user, information provided for theuser, and various menus of a terminal. Specifically, the display may beconfigured in a form of a liquid crystal display, an organiclight-emitting diode, or the like. In addition, a touchpad may befurther integrated into the display, and is configured to collect atouch event on or near the touchpad and send collected touch informationto another component (for example, a processor).

The communications module may be configured to support the secondelectronic device in communicating with another network entity, forexample, communicating with a server. The communications module may bespecifically a device that interacts with another second electronicdevice, such as a radio frequency circuit, a Bluetooth chip, or a WiFichip.

In addition, the second electronic device 3200 may further include astorage module, configured to store a picture sent by another electronicdevice, data obtained through processing, program code of the secondelectronic device, and the like. The storage module may be a memory. Thememory may include a high-speed RAM, or may include a nonvolatilememory, for example, a magnetic disk storage device, a flash memory, oranother volatile solid-state storage device.

In a specific implementation, when the processing module is a processor,the display module is a display, and the storage module is a memory, thefirst electronic device and the second electronic device in theembodiments of this application may be specifically the mobile phoneshown in FIG. 2 .

An embodiment of this application further provides a computer storagemedium. The computer storage medium stores a computer instruction, andwhen the computer instruction is run on an electronic device, theelectronic device is enabled to perform the foregoing related methodsteps to implement the image processing methods in the foregoingembodiments.

An embodiment of this application further provides a computer programproduct. When the computer program product is run on a computer, thecomputer is enabled to perform the foregoing related steps to implementthe image processing methods in the foregoing embodiments.

In addition, an embodiment of this application further provides anapparatus. The apparatus may be specifically a chip, a component, or amodule. The apparatus may include a processor and a memory that areconnected to each other. The memory is configured to store acomputer-executable instruction. When the apparatus runs, the processormay execute the computer-executable instruction stored in the memory, sothat the chip performs the image processing method in the foregoingmethod embodiments.

The electronic device, the computer storage medium, the computer programproduct, or the chip provided in the embodiments of this applicationeach is configured to perform the corresponding method provided above.Therefore, for beneficial effects that can be achieved, refer to thebeneficial effects of the corresponding method provided above. Detailsare not described herein again.

The foregoing descriptions of implementations allow a person skilled inthe art to understand that, for the purpose of convenient and briefdescription, division of the foregoing function modules is taken as anexample for illustration. During actual application, the foregoingfunctions can be allocated to different modules and implementedaccording to a requirement. In other words, an internal structure of anapparatus is divided into different function modules to implement all orsome of the functions described above.

In the several embodiments provided in this application, it should beunderstood that the disclosed apparatus and method may be implemented inother manners. For example, the described apparatus embodiment is merelyan example. For example, the module or unit division is merely logicalfunction division and may be other division during actualimplementation. For example, a plurality of units or components may becombined or integrated into another system, or some features may beignored or not performed. In addition, the displayed or discussed mutualcouplings or direct couplings or communication connections may beimplemented through some interfaces. The indirect couplings orcommunication connections between the apparatuses or units may beimplemented in electrical, mechanical, or other forms.

The units described as separate parts may or may not be physicallyseparate, and parts displayed as units may be one or more physicalunits, may be located in one place, or may be distributed on differentplaces. Some or all of the units may be selected according to actualrequirements to achieve the objectives of the solutions of theembodiments.

In addition, functional units in the embodiments of this application maybe integrated into one processing unit, or the units may exist alonephysically, or two or more units are integrated into one unit. Theintegrated unit may be implemented in a form of hardware, or may beimplemented in a form of a software functional unit.

When the integrated unit is implemented in the form of a softwarefunctional unit and sold or used as an independent product, theintegrated unit may be stored in a readable storage medium. Based onsuch an understanding, the technical solutions of this applicationessentially, or the part contributing to the prior art, or all or someof the technical solutions may be implemented in the form of a softwareproduct. The software product is stored in a storage medium and includesseveral instructions for instructing a device (which may be asingle-chip microcomputer, a chip or the like) or a processor(processor) to perform all or some of the steps of the methods describedin the embodiments of this application. The foregoing storage mediumincludes: any medium that can store program code, such as a USB flashdrive, a removable hard disk, a read-only memory (read only memory,ROM), a random access memory (random access memory, RAM), a magneticdisk, or an optical disc.

The foregoing descriptions are merely specific implementations of thisapplication, but are not intended to limit the protection scope of thisapplication. Any variation or replacement readily figured out by aperson skilled in the art within the technical scope disclosed in thisapplication shall fall within the protection scope of this application.Therefore, the protection scope of this application shall be subject tothe protection scope of the claims.

What is claimed is:
 1. An image processing method, comprising:displaying, by a first electronic device, a first screen, wherein thefirst screen is a camera screen of the first electronic device;detecting a first operation of a user on the first screen; obtaining afirst image file through photographing in response to the firstoperation, wherein the first image file comprises a picture or a video;automatically sending the first image file by the first electronicdevice to a second electronic device, wherein sending the first imagefile to the second electronic device is associated with a request forprocessing of the first image file by the second electronic device,wherein the request for processing of the first image file causes adisplay of prompt information on a second screen of the secondelectronic device, and wherein the prompt information indicates to asecond user of the second electronic device that the first electronicdevice requests image processing; automatically receiving, by the firstelectronic device, processing data sent by the second electronic device,wherein the processing data is obtained by processing of the first imagefile by the second electronic device in response to the first electronicdevice sending the first image file to the second electronic device andaccording to the request for processing of the first image file, andwherein the processing data is associated with a second image file;detecting a second operation of the user on the first screen; anddisplaying the second image file at the first electronic device inresponse to the second operation.
 2. The method according to claim 1,wherein the method further comprises performing, before the obtainingthe first image file: receiving a processing type that is set by theuser; and sending the processing type to the second electronic device.3. The method according to claim 2, wherein the processing typecomprises one or more of image beautification, image classification,image facial recognition, image clustering, image facial expressionrecognition, image age analysis, image optical character recognition(OCR), or image semantic segmentation.
 4. The method according to claim1, wherein the processing data comprises the second image file.
 5. Themethod according to claim 1, wherein the processing data comprises aresult obtained by performing facial recognition based on the firstimage file.
 6. The method according to claim 1, wherein the methodfurther comprises performing, before the obtaining the first image file:establishing a short-distance connection to the second electronicdevice.
 7. The method according to claim 1, wherein there are aplurality of second electronic devices, and the processing data is dataobtained by combining a plurality of pieces of processing data of theplurality of second electronic devices.
 8. The method according to claim7, wherein there are a plurality of processing types, and processingdata obtained by each second electronic device corresponds to at leastone of the plurality of processing types.
 9. The method according toclaim 1, wherein the processing data includes a label, wherein the labelcorresponds to a folder in the first electronic device, and wherein thesecond image file is an image in the folder.
 10. An image processingmethod comprising: establishing, by a second electronic device, ashort-distance connection to a first electronic device; receiving, bythe second electronic device, a first image file sent by the firstelectronic device, wherein the first image file comprises a picture or avideo, and wherein sending the first image file by the first electronicdevice is associated with a request for processing of the first imagefile by the second electronic device; displaying prompt information on ascreen of the second electronic device, wherein the prompt informationindicates to a user of the second electronic device that the firstelectronic device requests image processing; processing, by the secondelectronic device, the first image file in response to the firstelectronic device sending the first image file, and further in responseto detecting that the user accepts a third operation requested by thefirst electronic device; obtaining processing data according to theprocessing of the first image file; and sending the processing data bythe second electronic device to the first electronic device, wherein theprocessing data is associated with a second image file.
 11. The methodaccording to claim 10, further comprising performing, before thereceiving the first image file: obtaining a processing type.
 12. Themethod according to claim 11, wherein the third operation is anoperation by which the user sets the processing type for the first imagefile.
 13. The method according to claim 10, wherein the processing datacomprises the second image file.
 14. The method according to claim 10,wherein the method further comprises displaying the second image filebased on the processing data.
 15. The method according to claim 10,further comprising performing, after the processing data is obtained:negotiating with another electronic device about the processing data forthe first image file.
 16. An electronic device, comprising: one or moreprocessors; and one or more memories coupled to the one or moreprocessors, the one or more memories storing computer program code forexecution by the one or more processors, the computer program codeincluding instructions for: displaying a first screen, wherein the firstscreen is a camera screen of the electronic device; detecting a firstoperation of a user on the first screen; obtaining a first image filethrough photographing in response to the first operation, wherein thefirst image file comprises a picture or a video; automatically sendingthe first image file by the electronic device to a second electronicdevice, wherein sending the first image file to the second electronicdevice is associated with a request for processing of the first imagefile by the second electronic device, wherein the request for processingof the first image file causes a display of prompt information on asecond screen of the second electronic device, and wherein the promptinformation indicates to a second user of the second electronic devicethat the electronic device requests image processing; automaticallyreceiving processing data sent by the second electronic device, whereinthe processing data is obtained by the second electronic device byprocessing of the first image file by the second electronic device inresponse to the electronic device sending the first image file to thesecond electronic device and according to the request for processing ofthe first image file, and wherein the processing data is associated witha second image file; detecting a second operation of the user on thefirst screen; and displaying the second image file in response to thesecond operation.
 17. The electronic device according to claim 16,wherein the computer program code further includes instructions forperforming, before the obtaining the first image file: receiving aprocessing type that is set by the user; and sending the processing typeto the second electronic device.
 18. The electronic device according toclaim 17, wherein the processing type comprises one or more of imagebeautification, image classification, image facial recognition, imageclustering, image facial expression recognition, image age analysis,image optical character recognition (OCR), or image semanticsegmentation.
 19. The electronic device according to claim 16, whereinthe processing data comprises the second image file.
 20. The electronicdevice according to claim 16, wherein the processing data comprises aresult obtained by performing facial recognition based on the firstimage file.
 21. The electronic device according to claim 16, wherein thecomputer program code further includes instructions for performing,before the obtaining the first image file, establishing a short-distanceconnection to the second electronic device.